mirror of
https://github.com/love2d/love.git
synced 2026-08-20 04:30:09 +02:00
Fix off-by-one error in Fixture:getBits
This commit is contained in:
@@ -209,7 +209,7 @@ namespace box2d
|
|||||||
for (int i = 1;i<=argc;i++)
|
for (int i = 1;i<=argc;i++)
|
||||||
{
|
{
|
||||||
size_t bpos = (size_t)(lua_tointeger(L, i)-1);
|
size_t bpos = (size_t)(lua_tointeger(L, i)-1);
|
||||||
if (bpos > 16)
|
if (bpos >= 16)
|
||||||
return luaL_error(L, "Values must be in range 1-16.");
|
return luaL_error(L, "Values must be in range 1-16.");
|
||||||
b.set(bpos, true);
|
b.set(bpos, true);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user