From 702208e54132477eeff922ebf641ba56540b9456 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 25 Jan 2011 00:08:48 +0000 Subject: Fix parsing of numbers that begin with a `.'. Add number parsing test case. git-svn-id: http://svn.drobilla.net/serd/trunk@56 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- src/reader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/reader.c b/src/reader.c index 3a4ef452..6d7badbf 100644 --- a/src/reader.c +++ b/src/reader.c @@ -908,7 +908,7 @@ read_literal(SerdReader reader, Node* dest) Ref str = 0; Node datatype = INTERNAL_NODE_NULL; const uint8_t c = peek_byte(reader); - if (c == '-' || c == '+' || is_digit(c)) { + if (c == '-' || c == '+' || c == '.' || is_digit(c)) { return read_number(reader, dest); } else if (c == '\"') { str = read_quotedString(reader); -- cgit v1.2.1