Make path separator OS-dependent (PR #954)

This commit is contained in:
Andrea
2021-05-19 21:10:22 +01:00
committed by GitHub
parent 1b9a769332
commit de7f35e6bd
10 changed files with 30 additions and 24 deletions
+2 -2
View File
@@ -260,8 +260,8 @@ void GetImageTitle(LPCTSTR pPathname, std::string & pImageName, std::string & pF
LPCTSTR startpos = pPathname;
// imagetitle = <FILENAME.EXT>
if (_tcsrchr(startpos, TEXT('\\')))
startpos = _tcsrchr(startpos, TEXT('\\'))+1;
if (_tcsrchr(startpos, TEXT(PATH_SEPARATOR)))
startpos = _tcsrchr(startpos, TEXT(PATH_SEPARATOR))+1;
_tcsncpy(imagetitle, startpos, MAX_DISK_FULL_NAME);
imagetitle[MAX_DISK_FULL_NAME] = 0;