mirror of https://github.com/bjornbytes/lovr.git
Correct error check in Mesh:setVertexMap;
This commit is contained in:
parent
616e4b9488
commit
011b669892
|
@ -283,7 +283,7 @@ int l_lovrMeshSetVertexMap(lua_State* L) {
|
|||
}
|
||||
|
||||
int index = lua_tointeger(L, -1);
|
||||
if (index > lovrMeshGetVertexCount(mesh) || index < 0) {
|
||||
if (index > lovrMeshGetVertexCount(mesh) || index < 1) {
|
||||
free(indices);
|
||||
return luaL_error(L, "Invalid vertex map value: %d", index);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue