diff options
author | David Robillard <d@drobilla.net> | 2011-01-25 00:08:48 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-01-25 00:08:48 +0000 |
commit | 702208e54132477eeff922ebf641ba56540b9456 (patch) | |
tree | 7f553f8e8b848b654017d3db66b0fd6c0dbc749c /src | |
parent | 634b5459db03b4cd00539ec45b6a3b23f29481de (diff) | |
download | serd-702208e54132477eeff922ebf641ba56540b9456.tar.gz serd-702208e54132477eeff922ebf641ba56540b9456.tar.bz2 serd-702208e54132477eeff922ebf641ba56540b9456.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/reader.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |