Skip to content

Commit

Permalink
Blood: Remove directory path characters for levelGetTitle() (#772)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmyqlfpir authored Dec 22, 2023
1 parent 9c07795 commit 6b8ba20
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions source/blood/src/levels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,11 @@ char * levelGetTitle(void)
char *pTitle = gEpisodeInfo[nEpisode].levelsInfo[nLevel].Title;
if (*pTitle == 0)
return NULL;
for (int i = Bstrlen(pTitle)-1; i > 0; i--)
{
if ((pTitle[i] == '/') || (pTitle[i] == '\\'))
return &pTitle[i+1];
}
return pTitle;
}

Expand Down

0 comments on commit 6b8ba20

Please sign in to comment.