From: Arjen Baart Date: Fri, 14 Jan 2011 09:45:24 +0000 (+0100) Subject: Bugfix: read_journal() keeps reading beyonf EOF. X-Git-Url: http://www.andromeda.nl/gitweb/?p=account.git;a=commitdiff_plain;h=bb2e6a4c7f6b1db110324280cd2e8b0aa8084004 Bugfix: read_journal() keeps reading beyonf EOF. When a journal file finishes with a mutation and not with an empty line, reading beyond end of file resulted in an endless loop. Initializing first_char before reading from the input fixes this. --- diff --git a/account_main.cpp b/account_main.cpp index 27d7f01..b21e129 100644 --- a/account_main.cpp +++ b/account_main.cpp @@ -109,6 +109,7 @@ void read_journal(char *journal_file) while (i) { + first_char = '\n'; i.get(first_char); switch (first_char) {