Core: merged some analysis issue fixup commits from master and 335

This commit is contained in:
Ovahlord
2019-02-18 04:15:05 +01:00
parent 6d174c7e3b
commit f763095de9
4 changed files with 7 additions and 4 deletions

View File

@@ -275,7 +275,10 @@ namespace VMAP
}
FILE* tf = OpenMapTileFile(basePath, mapID, tileX, tileY, vm).File;
if (!tf)
result = LoadResult::FileNotFound;
{
fclose(rf);
return LoadResult::FileNotFound;
}
else
{
if (!readChunk(tf, chunk, VMAP_MAGIC, 8))

View File

@@ -178,7 +178,7 @@ struct PositionFullTerrainStatus
uint32 const mogpFlags;
};
PositionFullTerrainStatus() : areaId(0), floorZ(0.0f), outdoors(true) { }
PositionFullTerrainStatus() : areaId(0), floorZ(0.0f), outdoors(true), liquidStatus(LIQUID_MAP_NO_WATER) { }
uint32 areaId;
float floorZ;
bool outdoors;

View File

@@ -89,7 +89,7 @@ protected:
public:
explicit SplineBase() : index_lo(0), index_hi(0), m_mode(UninitializedMode), cyclic(false) { }
explicit SplineBase() : index_lo(0), index_hi(0), m_mode(UninitializedMode), cyclic(false), initialOrientation(0.f) { }
/** Caclulates the position for given segment Idx, and percent of segment length t
@param t - percent of segment length, assumes that t in range [0, 1]

View File

@@ -485,7 +485,7 @@ public:
return true;
}
handler->PSendSysMessage(LANG_COMMAND_GO_INSTANCE_FAILED, mapid, scriptname, exit->target_mapId);
handler->PSendSysMessage(LANG_COMMAND_GO_INSTANCE_FAILED, mapid, scriptname, exit ? exit->target_mapId : uint32(-1));
handler->SetSentErrorMessage(true);
return false;
}