aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-09-24 22:19:31 +0200
committerDavid Robillard <d@drobilla.net>2017-09-24 22:19:31 +0200
commit9dd64d03e482b84a3e35787d69028275f50533cd (patch)
tree4ddaa1ab2d2a87cbe15dd7b2fb53933912f5a462 /src
parent7fd30c11f1eab2554197a58732d2d045b433e5f3 (diff)
downloadserd-9dd64d03e482b84a3e35787d69028275f50533cd.tar.gz
serd-9dd64d03e482b84a3e35787d69028275f50533cd.tar.bz2
serd-9dd64d03e482b84a3e35787d69028275f50533cd.zip
Don't smash error status when lax parsing
Diffstat (limited to 'src')
-rw-r--r--src/reader.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/reader.c b/src/reader.c
index f106c87c..36f37bdb 100644
--- a/src/reader.c
+++ b/src/reader.c
@@ -140,7 +140,10 @@ eat_byte_safe(SerdReader* reader, const uint8_t byte)
default: ++reader->cur.col;
}
- reader->status = serd_byte_source_advance(&reader->source);
+ const SerdStatus st = serd_byte_source_advance(&reader->source);
+ if (st) {
+ reader->status = st;
+ }
return byte;
}