Skip to content

Commit

Permalink
fix getting category bits
Browse files Browse the repository at this point in the history
  • Loading branch information
TurtleP committed Jun 10, 2024
1 parent 60db149 commit cb8f829
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions source/objects/shape/shape.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,12 @@ int Shape::GetMask(lua_State* L)

uint16_t Shape::GetCategoryBits(lua_State* L) const
{
const auto isTable = lua_istable(L, -1);
const auto size = isTable ? luax::ObjectLength(L, 1) : 1;
const auto isTable = lua_istable(L, 1);
const auto argc = isTable ? luax::ObjectLength(L, 1) : lua_gettop(L);

std::bitset<0x10> bits;

for (int index = 0; index <= size; index++)
for (int index = 1; index <= argc; index++)
{
size_t position = 0;

Expand Down

0 comments on commit cb8f829

Please sign in to comment.