From cf53beb648a504e2cba3a0a6ea96ca51ae2304cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petri=20H=C3=A4kkinen?= Date: Wed, 17 Nov 2021 09:48:48 +0200 Subject: [PATCH] Fix indexing vectors with uppercase W. --- VM/src/lvmexecute.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/VM/src/lvmexecute.cpp b/VM/src/lvmexecute.cpp index 132fb253..ac316f7a 100644 --- a/VM/src/lvmexecute.cpp +++ b/VM/src/lvmexecute.cpp @@ -602,7 +602,8 @@ static void luau_execute(lua_State* L) int ic = (name[0] | ' ') - 'x'; #ifdef LUA_FLOAT4_VECTORS - if(name[0] == 'w') + // 'w' is before 'x' in ascii, so ic is -1 when the string is 'w' + if (ic == -1) ic = 3; #endif