mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Dep: Update CascLib to ladislav-zezula/CascLib@e2fc95cdb1
This commit is contained in:
@@ -166,13 +166,26 @@ static bool CutLastPathPart(TCHAR * szWorkPath)
|
||||
{
|
||||
size_t nLength = _tcslen(szWorkPath);
|
||||
|
||||
for(nLength = _tcslen(szWorkPath); nLength > 0; nLength--)
|
||||
// Go one character back
|
||||
if(nLength > 0)
|
||||
nLength--;
|
||||
|
||||
// Cut ending (back)slashes, if any
|
||||
while(nLength > 0 && (szWorkPath[nLength] == _T('\\') || szWorkPath[nLength] == _T('/')))
|
||||
nLength--;
|
||||
|
||||
// Cut the last path part
|
||||
while(nLength > 0)
|
||||
{
|
||||
if(szWorkPath[nLength] == '\\' || szWorkPath[nLength] == '/')
|
||||
// End of path?
|
||||
if(szWorkPath[nLength] == _T('\\') || szWorkPath[nLength] == _T('/'))
|
||||
{
|
||||
szWorkPath[nLength] = 0;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Go one character back
|
||||
nLength--;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user