Skip to content

Commit

Permalink
Update main.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
SnorlaxAssist authored Mar 28, 2024
1 parent 5f39231 commit ee7084f
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -537,11 +537,9 @@ TestResult RUN_TEST(string testName, string fileName)
if (pctype != LUA_TNUMBER)
return 0;
lua_rawgeti(L, -2, lua_tointeger(L, -1));
if (lua_isnil(L, -1))
if (!lua_isnumber(L, -1))
return 0;

int line = lua_tointeger(L, -1);

lua_setfield(L, LUA_REGISTRYINDEX, "@TestStepLine");

return 0;
Expand Down Expand Up @@ -1005,4 +1003,4 @@ int main(int argc, char* argv[])
}
printf("All tests passed\n");
return 0;
}
}

0 comments on commit ee7084f

Please sign in to comment.