Fix loading luau code starting with \t

This commit is contained in:
Alex Orlenko
2023-07-22 18:44:44 +01:00
parent f6dff65d9b
commit 6fb65a8fbe
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -341,7 +341,7 @@ pub unsafe fn luaL_loadbufferx(
fn free(p: *mut c_void);
}
let chunk_is_text = size == 0 || (*data as u8) >= b'\n';
let chunk_is_text = size == 0 || (*data as u8) >= b'\t';
if !mode.is_null() {
let modeb = CStr::from_ptr(mode).to_bytes();
if !chunk_is_text && !modeb.contains(&b'b') {