From f4c4c0072db99565da33822e02bbca0c3943668a Mon Sep 17 00:00:00 2001
From: David Robillard <d@drobilla.net>
Date: Sun, 11 Jul 2021 11:39:01 -0400
Subject: Fix hang when skipping an error at EOF when lax parsing

---
 src/n3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'src')

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);
   }
 }
-- 
cgit v1.2.1