Replays: replace slashes in branch name with hyphen

This commit is contained in:
James R 2025-06-03 16:15:34 -07:00
parent 5ed7b13ddb
commit d457a0b581

View file

@ -8159,6 +8159,15 @@ static void P_InitGametype(void)
#else
strcpy(ver, VERSIONSTRING);
#endif
// Replace path separators with hyphens
{
char *p = ver;
while ((p = strpbrk(p, "/\\")))
{
*p = '-';
p++;
}
}
sprintf(buf, "%s" PATHSEP "media" PATHSEP "replay" PATHSEP "online" PATHSEP "%s" PATHSEP "%d-%s",
srb2home, ver, (int) (time(NULL)), G_BuildMapName(gamemap));