mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Correct get_file_line_as_string to fix #2829
This commit is contained in:
@@ -36,6 +36,9 @@ gb_internal gbString get_file_line_as_string(TokenPos const &pos, i32 *offset_)
|
|||||||
|
|
||||||
u8 *start = file->tokenizer.start;
|
u8 *start = file->tokenizer.start;
|
||||||
u8 *end = file->tokenizer.end;
|
u8 *end = file->tokenizer.end;
|
||||||
|
if (start == end) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
isize len = end-start;
|
isize len = end-start;
|
||||||
if (len < offset) {
|
if (len < offset) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|||||||
Reference in New Issue
Block a user