diff options
author | David Robillard <d@drobilla.net> | 2017-09-24 22:19:31 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-09-24 22:19:31 +0200 |
commit | 9dd64d03e482b84a3e35787d69028275f50533cd (patch) | |
tree | 4ddaa1ab2d2a87cbe15dd7b2fb53933912f5a462 /src/reader.c | |
parent | 7fd30c11f1eab2554197a58732d2d045b433e5f3 (diff) | |
download | serd-9dd64d03e482b84a3e35787d69028275f50533cd.tar.gz serd-9dd64d03e482b84a3e35787d69028275f50533cd.tar.bz2 serd-9dd64d03e482b84a3e35787d69028275f50533cd.zip |
Don't smash error status when lax parsing
Diffstat (limited to 'src/reader.c')
-rw-r--r-- | src/reader.c | 5 |
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; } |