From: Carl Worth Date: Sat, 28 Mar 2009 18:00:23 +0000 (-0700) Subject: Recognize '-' as a numeric characeter as well X-Git-Url: https://git.cworth.org/git?p=mnemon;a=commitdiff_plain;h=565b76aa595b6a9ed43219b590cf2e10afcf7e9a;hp=cb853e60989f34c4608ac3c521bf90a01d0387d9 Recognize '-' as a numeric characeter as well Without this fix, mnemon would croak when encountering a negative score in a data file, (which can happen after quitting with some unlearned items). --- diff --git a/mnemon.c b/mnemon.c index ac7c765..33f2c26 100644 --- 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, '=');