Skip to content

Commit

Permalink
Merge pull request ddnet#8946 from MilkeeyCat/pr_fix_callvote_map_change
Browse files Browse the repository at this point in the history
Don't add `/` if the directory is empty
  • Loading branch information
Robyt3 authored Sep 14, 2024
2 parents 868c513 + 232018d commit 0369946
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 0369946

Please sign in to comment.