Skip to content

Commit d924ed0

Browse files
author
Kingfree
committed
fix(ucid): luaL_loadstring should end with '\0'
1 parent 7087ada commit d924ed0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testcrate/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ fn lua_works() {
4747
fn unicode_identifiers() {
4848
unsafe {
4949
let state = luaL_newstate();
50-
let code = "local 😀 = 0\n";
50+
let code = "local 😀 = 0\0";
5151
let ret = luaL_loadstring(state, code.as_ptr().cast());
5252
#[cfg(feature = "lua54")]
5353
assert_eq!(0, ret);

0 commit comments

Comments
 (0)