From c437b5bb89bea4c2026318d4c4d24c3f31705442 Mon Sep 17 00:00:00 2001 From: Jupeyy Date: Tue, 12 Sep 2017 21:06:12 +0200 Subject: [PATCH] use 64 bit variable --- src/game/client/components/maplayers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/game/client/components/maplayers.cpp b/src/game/client/components/maplayers.cpp index ce1afb6a5..d48d7ca85 100644 --- a/src/game/client/components/maplayers.cpp +++ b/src/game/client/components/maplayers.cpp @@ -801,7 +801,7 @@ void CMapLayers::RenderTileLayer(int LayerIndex, vec4* pColor, CMapItemLayerTile //create the indice buffers we want to draw -- reuse them static std::vector IndexOffsets; static std::vector DrawCounts; - static int maxRes = (IndexOffsets.max_size() > DrawCounts.max_size() ? DrawCounts.max_size() : IndexOffsets.max_size()); + static unsigned long long maxRes = (IndexOffsets.max_size() > DrawCounts.max_size() ? DrawCounts.max_size() : IndexOffsets.max_size()); IndexOffsets.clear(); DrawCounts.clear(); @@ -813,7 +813,7 @@ void CMapLayers::RenderTileLayer(int LayerIndex, vec4* pColor, CMapItemLayerTile int GroupXEnd = X1 / INDEX_BUFFER_GROUP_WIDTH; int GroupYEnd = Y1 / INDEX_BUFFER_GROUP_HEIGHT; - int Reserve = absolute(GroupYEnd - GroupYStart) + 1; + unsigned long long Reserve = absolute(GroupYEnd - GroupYStart) + 1; if(Reserve > maxRes) Reserve = maxRes; IndexOffsets.reserve(Reserve); DrawCounts.reserve(Reserve);