From 1d2d35c6f252195ca4e81d8ac006d5f339e7dade Mon Sep 17 00:00:00 2001 From: petrihakkinen Date: Thu, 18 Nov 2021 20:43:11 +0200 Subject: [PATCH] Fix hardcoded vector size in hashvec Co-authored-by: Arseny Kapoulkine --- VM/src/ltable.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VM/src/ltable.cpp b/VM/src/ltable.cpp index 5cbacc6c..0b55fcea 100644 --- a/VM/src/ltable.cpp +++ b/VM/src/ltable.cpp @@ -97,7 +97,7 @@ static LuaNode* hashnum(const Table* t, double n) static LuaNode* hashvec(const Table* t, const float* v) { - unsigned int i[4]; + unsigned int i[LUA_VECTOR_SIZE]; memcpy(i, v, sizeof(i)); // convert -0 to 0 to make sure they hash to the same value