summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLukas Fleischer <calcurse@cryptocrack.de>2013-02-01 18:28:07 +0100
committerLukas Fleischer <calcurse@cryptocrack.de>2013-02-01 18:30:30 +0100
commit93767ce29c6ea41c40808276aa0ae9fc60d5eca5 (patch)
treefa91b9f47b43bc72a6e52748a51614b183c10527 /src
parente27cf190d05e6b07cba1dfe47dd2426a3c167056 (diff)
downloadcalcurse-93767ce29c6ea41c40808276aa0ae9fc60d5eca5.zip
Properly skip spaces after exception list
Skip whitespace after obtaining the list of exceptions instead of skipping the next character unconditionally. Signed-off-by: Lukas Fleischer <calcurse@cryptocrack.de>
Diffstat (limited to 'src')
-rw-r--r--src/io.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/io.c b/src/io.c
index 2ae19d0..ff8d1ea 100644
--- a/src/io.c
+++ b/src/io.c
@@ -526,7 +526,8 @@ void io_load_app(void)
if (c == '!') {
ungetc(c, data_file);
recur_exc_scan(&exc, data_file);
- c = getc(data_file);
+ while ((c = getc(data_file)) == ' ') ;
+ ungetc(c, data_file);
} else if (c == '}') {
while ((c = getc(data_file)) == ' ') ;
ungetc(c, data_file);
@@ -535,7 +536,8 @@ void io_load_app(void)
} else if (c == '!') { /* endless item with exceptions */
ungetc(c, data_file);
recur_exc_scan(&exc, data_file);
- c = getc(data_file);
+ while ((c = getc(data_file)) == ' ') ;
+ ungetc(c, data_file);
until.tm_year = 0;
} else {
io_load_error(path_apts, line,