lib/parser.c: avoid overflow in match_number()