Skip to content

Commit

Permalink
Added check for leading slash, for callvote convinience
Browse files Browse the repository at this point in the history
  • Loading branch information
Chrissstrahl committed Jun 24, 2024
1 parent e69e558 commit 1705991
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dlls/game/gamefix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1879,11 +1879,15 @@ char* gamefix_duplicateString(const char* source)
//--------------------------------------------------------------
str gamefix_cleanMapName(const str& mapname)
{
str cleanMapName = mapname;
if (cleanMapName[0] == '/') {
cleanMapName = gamefix_getStringUntil(mapname,1, mapname.length());
}

int filth = gamefix_findChar(mapname,'$');
if (filth == -1) {
return mapname;
return cleanMapName;
}
str cleanMapName = mapname;
cleanMapName.CapLength(filth);
return cleanMapName;
}
Expand Down

0 comments on commit 1705991

Please sign in to comment.