Skip to content

Commit

Permalink
Fix luax_readmesh error message;
Browse files Browse the repository at this point in the history
  • Loading branch information
bjornbytes committed May 27, 2023
1 parent 4e4184c commit 8e0ceec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/api/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ int luax_readmesh(lua_State* L, int index, float** vertices, uint32_t* vertexCou
for (uint32_t i = 0; i < *indexCount; i++) {
lua_rawgeti(L, index + 1, i + 1);
uint32_t index = luaL_checkinteger(L, -1) - 1;
lovrAssert(index < *vertexCount, "Invalid vertex index %d (expected [%d, %d])", 1, *vertexCount);
lovrAssert(index < *vertexCount, "Invalid vertex index %d (expected [%d, %d])", index, 1, *vertexCount);
(*indices)[i] = index;
lua_pop(L, 1);
}
Expand Down

0 comments on commit 8e0ceec

Please sign in to comment.