about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/tokenizer.pry3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tokenizer.pry b/src/tokenizer.pry
index c809420..78b472a 100644
--- a/src/tokenizer.pry
+++ b/src/tokenizer.pry
@@ -226,6 +226,9 @@ let tokenizer_consume_until_condition = (t: *tokenizer, condition: (i8) => bool)
 
 		let offset = (*t).offset;
 		if c == '\\' {
+			if offset >= (*t).buf_len {
+				return res;
+			};
 			let next_c = (*((*t).buf + cast(*i8, offset + 1)));
 		
 			let any = false;