Skip to content

lua_pcall undefined behavior #2

Closed
@RodrigoDornelles

Description

@RodrigoDornelles

not crash the game but, when i use lua_getglobal(L, "native_callback_draw) without calling crash!

f=function()end;native_callback_init=f;native_callback_loop=f;function native_callback_draw()native_draw_rect(0,1,1,9,20)end

its loaded by luaL_loadbuffer #1, but when i call lua_pcall(L, 0, 0, 0) crash the game.

function native_callback_init(g,w,h)end
function native_callback_loop(d)end
function native_callback_draw()native_draw_rect(0,1,1,9,20)end

Could this be a stackoverflow? It's been difficult to run basic things in lua.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions