aboutsummaryrefslogtreecommitdiffstats
path: root/src/n3.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-07-11 11:39:01 -0400
committerDavid Robillard <d@drobilla.net>2022-10-23 22:24:49 -0400
commitf4c4c0072db99565da33822e02bbca0c3943668a (patch)
tree20d5c89c56d37e29b8a35bcb082dd271025cb584 /src/n3.c
parentb7e22e9227a83b3c2f925b774f0794084ba526ff (diff)
downloadserd-f4c4c0072db99565da33822e02bbca0c3943668a.tar.gz
serd-f4c4c0072db99565da33822e02bbca0c3943668a.tar.bz2
serd-f4c4c0072db99565da33822e02bbca0c3943668a.zip
Fix hang when skipping an error at EOF when lax parsing
Diffstat (limited to 'src/n3.c')
-rw-r--r--src/n3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/n3.c b/src/n3.c
index 2cbfb55a..cd6b6de6 100644
--- a/src/n3.c
+++ b/src/n3.c
@@ -1685,7 +1685,7 @@ read_n3_statement(SerdReader* const reader)
static void
skip_until(SerdReader* const reader, const uint8_t byte)
{
- for (int c = 0; (c = peek_byte(reader)) && c != byte;) {
+ for (int c = 0; (c = peek_byte(reader)) && c != byte && c != EOF;) {
eat_byte_safe(reader, c);
}
}