From bcf0421da964f6bece3d902c3bde12a73c8c96cc Mon Sep 17 00:00:00 2001 From: bjorn Date: Fri, 7 Jun 2024 18:30:27 -0700 Subject: [PATCH] Fix -2 scale components; --- src/api/api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/api/api.c b/src/api/api.c index 773d4682..f2785717 100644 --- a/src/api/api.c +++ b/src/api/api.c @@ -649,6 +649,7 @@ int luax_readscale(lua_State* L, int index, vec3 v, int components, const char* } else if (components == -2) { // -2 is special and means "2 components: xy and z" v[0] = v[1] = luax_tofloat(L, index); v[2] = luax_optfloat(L, index, 1.f); + return index + 2; } else { v[0] = v[1] = v[2] = 1.f; for (int i = 0; i < components; i++) {