mirror of
https://github.com/love2d/love.git
synced 2026-08-16 08:11:02 +02:00
Fixed a potential null pointer dereference and a case of undefined behaviour
This commit is contained in:
@@ -126,7 +126,7 @@ public:
|
||||
|
||||
if (index >= SIZE)
|
||||
{
|
||||
printf("\nConstant %s out of bounds with %i!\n", key, index);
|
||||
printf("Constant %s out of bounds with %u!\n", key, index);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -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