Correct get_file_line_as_string to fix #2829

This commit is contained in:
gingerBill
2023-09-29 12:17:15 +01:00
parent 23054138c2
commit 3fae38a2f8

View File

@@ -36,6 +36,9 @@ gb_internal gbString get_file_line_as_string(TokenPos const &pos, i32 *offset_)
u8 *start = file->tokenizer.start;
u8 *end = file->tokenizer.end;
if (start == end) {
return nullptr;
}
isize len = end-start;
if (len < offset) {
return nullptr;