Fix hardcoded vector size in hashvec

Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com>
This commit is contained in:
petrihakkinen 2021-11-18 20:43:11 +02:00 committed by GitHub
parent d9c0977734
commit 1d2d35c6f2
Signed by: DevComp
GPG key ID: 4AEE18F83AFDEB23

View file

@ -97,7 +97,7 @@ static LuaNode* hashnum(const Table* t, double n)
static LuaNode* hashvec(const Table* t, const float* v) static LuaNode* hashvec(const Table* t, const float* v)
{ {
unsigned int i[4]; unsigned int i[LUA_VECTOR_SIZE];
memcpy(i, v, sizeof(i)); memcpy(i, v, sizeof(i));
// convert -0 to 0 to make sure they hash to the same value // convert -0 to 0 to make sure they hash to the same value