1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-05 18:41:05 +00:00

Reject NaN and Inf in check_v3d() too

check_v2f() was already doing this
This commit is contained in:
sfan5 2025-05-19 17:44:59 +02:00
parent ec16fb33d0
commit 6ca9d75f0b
2 changed files with 16 additions and 0 deletions

View file

@ -199,6 +199,9 @@ v3d check_v3d(lua_State *L, int index)
double y = lua_tonumber(L, -2);
double z = lua_tonumber(L, -1);
lua_pop(L, 3);
CHECK_FLOAT(x, "x");
CHECK_FLOAT(y, "y");
CHECK_FLOAT(z, "z");
return v3d(x, y, z);
}