Skip to content

Commit

Permalink
Update src/game/vmap/MapTree.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
technoir42 committed Feb 15, 2012
1 parent 2e44e58 commit 479a8b3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/game/vmap/MapTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,10 +121,8 @@ namespace VMAP
StaticMapTree::StaticMapTree(uint32 mapID, const std::string &basePath):
iMapID(mapID), iTreeValues(0), iBasePath(basePath)
{
if (iBasePath.length() > 0 && (iBasePath[iBasePath.length()-1] != '/' || iBasePath[iBasePath.length()-1] != '\\'))
{
if (iBasePath.length() > 0 && (iBasePath[iBasePath.length()-1] != '/' && iBasePath[iBasePath.length()-1] != '\\'))
iBasePath.append("/");
}
}

//=========================================================
Expand Down Expand Up @@ -235,7 +233,7 @@ namespace VMAP
bool StaticMapTree::CanLoadMap(const std::string &vmapPath, uint32 mapID, uint32 tileX, uint32 tileY)
{
std::string basePath = vmapPath;
if (basePath.length() > 0 && (basePath[basePath.length()-1] != '/' || basePath[basePath.length()-1] != '\\'))
if (basePath.length() > 0 && (basePath[basePath.length()-1] != '/' && basePath[basePath.length()-1] != '\\'))
basePath.append("/");
std::string fullname = basePath + VMapManager2::getMapFileName(mapID);
bool success = true;
Expand Down

1 comment on commit 479a8b3

@DomGries
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could have removed the brackets :P

Please sign in to comment.