mirror of
https://github.com/odrling/Aegisub
synced 2025-04-11 22:56:02 +02:00
Fix read from before beginning of stack
This commit is contained in:
parent
b4de0b9b82
commit
ec4a8c9a26
@ -54,7 +54,7 @@ inline void push_value(lua_State *L, std::string const& value) {
|
||||
}
|
||||
|
||||
inline void push_value(lua_State *L, lua_CFunction value) {
|
||||
if (lua_type(L, -2) == LUA_TUSERDATA) {
|
||||
if (lua_gettop(L) >= 2 && lua_type(L, -2) == LUA_TUSERDATA) {
|
||||
lua_pushvalue(L, -2);
|
||||
lua_pushcclosure(L, value, 1);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user