From 2ef83e4a7188d1535e3c0b36fde75792a6f6bd70 Mon Sep 17 00:00:00 2001 From: terminx Date: Mon, 12 Aug 2019 03:15:10 +0000 Subject: [PATCH] This can overflow git-svn-id: https://svn.eduke32.com/eduke32@7949 1a8010ca-5511-0410-912e-c29ae57300e0 --- source/build/src/voxmodel.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/build/src/voxmodel.cpp b/source/build/src/voxmodel.cpp index 2617ebb9e..4d43a7a2d 100644 --- a/source/build/src/voxmodel.cpp +++ b/source/build/src/voxmodel.cpp @@ -85,7 +85,7 @@ static int32_t getvox(int32_t x, int32_t y, int32_t z) { z += x*yzsiz + y*voxsiz.z; - for (x=vcolhashead[(z*214013)&vcolhashsizm1]; x>=0; x=vcol[x].n) + for (x=vcolhashead[(z*214013LL)&vcolhashsizm1]; x>=0; x=vcol[x].n) if (vcol[x].p == z) return vcol[x].c; @@ -102,7 +102,7 @@ static void putvox(int32_t x, int32_t y, int32_t z, int32_t col) z += x*yzsiz + y*voxsiz.z; - vcol[vnum].p = z; z = (z*214013)&vcolhashsizm1; + vcol[vnum].p = z; z = (z*214013LL)&vcolhashsizm1; vcol[vnum].c = col; vcol[vnum].n = vcolhashead[z]; vcolhashead[z] = vnum++; }