From bb2e6a4c7f6b1db110324280cd2e8b0aa8084004 Mon Sep 17 00:00:00 2001 From: Arjen Baart Date: Fri, 14 Jan 2011 10:45:24 +0100 Subject: [PATCH] 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. --- account_main.cpp | 1 + 1 file changed, 1 insertion(+) 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) { -- 2.11.0