aboutsummaryrefslogtreecommitdiffstats
path: root/src/reader.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-02-04 01:12:36 +0000
committerDavid Robillard <d@drobilla.net>2011-02-04 01:12:36 +0000
commitdccceaf112ac67460532dcced9007462bea3a0de (patch)
tree5f66c40f510227b4314bd61055561d3af7461131 /src/reader.c
parent645d107da822b52f0660163de61ff1a9074fc671 (diff)
downloadserd-dccceaf112ac67460532dcced9007462bea3a0de.tar.gz
serd-dccceaf112ac67460532dcced9007462bea3a0de.tar.bz2
serd-dccceaf112ac67460532dcced9007462bea3a0de.zip
Fix parsing double with signs in their exponents (e.g. 1.234e+56).
git-svn-id: http://svn.drobilla.net/serd/trunk@95 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/reader.c')
-rw-r--r--src/reader.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/reader.c b/src/reader.c
index 79b61385..a342a4d2 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -869,6 +869,11 @@ read_number(SerdReader reader, Node* dest)
if (c == 'e' || c == 'E') {
// double
push_byte(reader, str, eat_byte(reader, c));
+ switch ((c = peek_byte(reader))) {
+ case '+': case '-':
+ push_byte(reader, str, eat_byte(reader, c));
+ default: break;
+ }
read_0_9(reader, str, true);
datatype = push_string(reader, XSD_DOUBLE, strlen(XSD_DOUBLE) + 1);
} else if (has_decimal) {