We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c9099a4 commit 032d4afCopy full SHA for 032d4af
src/ffi/luau/compat.rs
@@ -341,7 +341,7 @@ pub unsafe fn luaL_loadbufferx(
341
fn free(p: *mut c_void);
342
}
343
344
- let chunk_is_text = size == 0 || (*data as u8) >= b'\n';
+ let chunk_is_text = size == 0 || (*data as u8) >= b'\t';
345
if !mode.is_null() {
346
let modeb = CStr::from_ptr(mode).to_bytes();
347
if !chunk_is_text && !modeb.contains(&b'b') {
tests/tests.rs
@@ -69,7 +69,7 @@ fn test_safety() -> Result<()> {
69
fn test_load() -> Result<()> {
70
let lua = Lua::new();
71
72
- let func = lua.load("return 1+2").into_function()?;
+ let func = lua.load("\treturn 1+2").into_function()?;
73
let result: i32 = func.call(())?;
74
assert_eq!(result, 3);
75
0 commit comments