mirror of
https://github.com/love2d/love.git
synced 2026-08-14 01:20:56 +02:00
Fixed a potential null pointer dereference and a case of undefined behaviour
This commit is contained in:
@@ -538,7 +538,7 @@ int luax_insist(lua_State *L, int idx, const char *k)
|
||||
{
|
||||
// Convert to absolute index if necessary.
|
||||
if (idx < 0 && idx > LUA_REGISTRYINDEX)
|
||||
idx = lua_gettop(L) + ++idx;
|
||||
idx += lua_gettop(L) + 1;
|
||||
|
||||
lua_getfield(L, idx, k);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user