Bugfix: read_journal() keeps reading beyonf EOF.
authorArjen Baart <arjen@andromeda.nl>
Fri, 14 Jan 2011 09:45:24 +0000 (10:45 +0100)
committerArjen Baart <arjen@andromeda.nl>
Fri, 14 Jan 2011 09:45:24 +0000 (10:45 +0100)
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.

account_main.cpp

index 27d7f01..b21e129 100644 (file)
@@ -109,6 +109,7 @@ void read_journal(char *journal_file)
 
    while (i)
    {
+      first_char = '\n';
       i.get(first_char);
       switch (first_char)
       {