Skip to content

Commit

Permalink
Don't add / if the directory is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
MilkeeyCat committed Sep 14, 2024
1 parent 868c513 commit 232018d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/server/gamecontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3526,7 +3526,7 @@ void CGameContext::ConAddMapVotes(IConsole::IResult *pResult, void *pUserData)
str_format(aCommand, sizeof(aCommand), "clear_votes; add_map_votes \"%s\"", aDirectory);
}
else
str_format(aCommand, sizeof(aCommand), "change_map \"%s/%s\"", pDirectory, aOptionEscaped);
str_format(aCommand, sizeof(aCommand), "change_map \"%s%s%s\"", pDirectory, pDirectory[0] == '\0' ? "" : "/", aOptionEscaped);

pSelf->AddVote(aDescription, aCommand);
}
Expand Down

0 comments on commit 232018d

Please sign in to comment.