From acc22608b8b3283febd390dbd0b9944e56341be5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petri=20H=C3=A4kkinen?= Date: Thu, 18 Nov 2021 11:39:55 +0200 Subject: [PATCH] Fixed unused variable warning on mac os. --- VM/src/lbuiltins.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/VM/src/lbuiltins.cpp b/VM/src/lbuiltins.cpp index 85d7865a..34e9ebc1 100644 --- a/VM/src/lbuiltins.cpp +++ b/VM/src/lbuiltins.cpp @@ -1027,13 +1027,14 @@ static int luauF_vector(lua_State* L, StkId res, TValue* arg0, int nresults, Stk double x = nvalue(arg0); double y = nvalue(args); double z = nvalue(args + 1); - double w = 0.0; #if LUA_VECTOR_SIZE == 4 - w = nvalue(args + 2); + double w = nvalue(args + 2); + setvvalue(res, float(x), float(y), float(z), float(w)); +#else + setvvalue(res, float(x), float(y), float(z), 0.0f); #endif - setvvalue(res, float(x), float(y), float(z), float(w)); return 1; }