projects
/
mnemon
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb853e6
)
Recognize '-' as a numeric characeter as well
author
Carl Worth
<cworth@cworth.org>
Sat, 28 Mar 2009 18:00:23 +0000
(11:00 -0700)
committer
Carl Worth
<cworth@cworth.org>
Sat, 28 Mar 2009 18:00:23 +0000
(11:00 -0700)
Without this fix, mnemon would croak when encountering a negative score
in a data file, (which can happen after quitting with some unlearned
items).
mnemon.c
patch
|
blob
|
history
diff --git
a/mnemon.c
b/mnemon.c
index ac7c7652d5fd07c6c0dc8c32669eeede5a52947f..33f2c260132a6efff082da9989da5ca6be6ef739 100644
(file)
--- a/
mnemon.c
+++ b/
mnemon.c
@@
-578,7
+578,7
@@
mnemon_load_category (mnemon_t *mnemon,
/* An initial digit means we hit an item. Trigger the
* spaghetti machine. */
- if (
*line >= '0' && *line <= '9
')
+ if (
(*line >= '0' && *line <= '9') || *line == '-
')
goto PARSE_BIN;
equal = strchr (line, '=');