+fix: find file extension

This commit is contained in:
METANEOCORTEX\Kotti 2021-12-01 12:42:05 +01:00
parent 5d872f58cb
commit b19a3f3ed6

View File

@ -1168,7 +1168,7 @@ LPCWSTR PTHAPI Path_FindExtension(const HPATHL hpth)
///PathXCchFindExtension(StrgGet(hstr), StrgGetAllocLength(hstr), &pext);
LPCWSTR pfile = Path_FindFileName(hpth);
LPWSTR const pdot = pfile ? wcschr(pfile, L'.') : NULL;
LPWSTR const pdot = pfile ? wcsrchr(pfile, L'.') : NULL;
StrgSanitize(hstr);
return pdot ? pdot : &wbuf[StrgGetLength(hstr)];