From 9dd64d03e482b84a3e35787d69028275f50533cd Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sun, 24 Sep 2017 22:19:31 +0200 Subject: Don't smash error status when lax parsing --- src/reader.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; } -- cgit v1.2.1