projects
/
account.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d34a6a5
)
Bugfix: read_journal() keeps reading beyonf EOF.
author
Arjen Baart
<arjen@andromeda.nl>
Fri, 14 Jan 2011 09:45:24 +0000
(10:45 +0100)
committer
Arjen 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
patch
|
blob
|
history
diff --git
a/account_main.cpp
b/account_main.cpp
index
27d7f01
..
b21e129
100644
(file)
--- 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)
{