From 1e9fc84a12ae08516328127c5e22f0d64bafc715 Mon Sep 17 00:00:00 2001 From: Shauren Date: Tue, 4 Sep 2012 14:40:41 +0200 Subject: Core: Warning fixes C4100: 'x' : unreferenced formal parameter C4310: cast truncates constant value C4389: '==' : signed/unsigned mismatch C4668: 'x' is not defined as a preprocessor macro, replacing with '0' for '#if/#elif' C4701: potentially uninitialized local variable 'x' used C4826: Conversion from 'HMODULE' to 'DWORD64' is sign-extended. This may cause unexpected runtime behavior. C6067: Parameter '3' in call to 'sprintf' must be the address of the string C6387: 'argument 1' might be '0': this does not adhere to the specification for the function 'CloseHandle' --- src/server/game/Maps/Map.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/server/game/Maps') diff --git a/src/server/game/Maps/Map.cpp b/src/server/game/Maps/Map.cpp index c06c7414e6e..fdf4b9ee8de 100755 --- a/src/server/game/Maps/Map.cpp +++ b/src/server/game/Maps/Map.cpp @@ -1223,8 +1223,8 @@ bool GridMap::loadLiquidData(FILE* in, uint32 offset, uint32 /*size*/) } if (!(header.flags & MAP_LIQUID_NO_HEIGHT)) { - _liquidMap = new float[_liquidWidth*_liquidHeight]; - if (fread(_liquidMap, sizeof(float), _liquidWidth*_liquidHeight, in) != _liquidWidth*_liquidHeight) + _liquidMap = new float[uint32(_liquidWidth) * uint32(_liquidHeight)]; + if (fread(_liquidMap, sizeof(float), _liquidWidth*_liquidHeight, in) != (uint32(_liquidWidth) * uint32(_liquidHeight))) return false; } return true; -- cgit v1.2.3