Browse Source

Fix off-by-one error in Fixture:getBits

Bill Meltsner 13 years ago
parent
commit
f67d454aa3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/modules/physics/box2d/Fixture.cpp

+ 1 - 1
src/modules/physics/box2d/Fixture.cpp

@@ -209,7 +209,7 @@ namespace box2d
 		for (int i = 1;i<=argc;i++)
 		{
 			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.");
 			b.set(bpos, true);
 		}