mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-09 09:38:19 +00:00
Merge pull request #8946 from MilkeeyCat/pr_fix_callvote_map_change
Don't add `/` if the directory is empty
This commit is contained in:
commit
0369946156
|
@ -3526,7 +3526,7 @@ void CGameContext::ConAddMapVotes(IConsole::IResult *pResult, void *pUserData)
|
||||||
str_format(aCommand, sizeof(aCommand), "clear_votes; add_map_votes \"%s\"", aDirectory);
|
str_format(aCommand, sizeof(aCommand), "clear_votes; add_map_votes \"%s\"", aDirectory);
|
||||||
}
|
}
|
||||||
else
|
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);
|
pSelf->AddVote(aDescription, aCommand);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue