Index: parse.c =================================================================== --- parse.c (revision 11219) +++ parse.c (revision 11220) @@ -291,11 +291,12 @@ p->state = ST_IDLE; /* wanted to finish and finished */ return res; } - if (!isdigit(c)) - return error(ctx, "Expected digit or separator in number"); - p->token[p->len] = c; - p->len++; - return 0; + if (isdigit(c) || ((c == '-') && (p->len == 0))) { + p->token[p->len] = c; + p->len++; + return 0; + } + return error(ctx, "Expected digit or separator in number"); } return error(ctx, "Internal error: broken state machine"); }