This commit is contained in:
2026-05-14 23:28:16 -05:00
parent 8a4cce0da4
commit 89caa700cf
6 changed files with 81 additions and 40 deletions

View File

@@ -35,7 +35,7 @@ TYC_RESULT code_assemble(const char* code, uint8_t** bytecode, size_t* bytecode_
if (!lua_isstring(L, -1))
abort();
*bytecode_sz = luaL_len(L, -1);
*bytecode_sz = (size_t) luaL_len(L, -1);
*bytecode = malloc(*bytecode_sz);
memcpy(*bytecode, lua_tostring(L, -1), *bytecode_sz);