1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-30 10:15:36 +01:00

Respect POSIX path separators on Windows (#6356)

This commit is contained in:
vector-of-bool
2017-10-08 13:28:38 -06:00
committed by Michał Janiszewski
parent 26cb4adb9b
commit 57a8bbac23
6 changed files with 25 additions and 20 deletions

View File

@@ -157,7 +157,7 @@ namespace String
return SIZE_MAX;
}
size_t LastIndexOf(const utf8 * str, utf8 match)
ptrdiff_t LastIndexOf(const utf8 * str, utf8 match)
{
const utf8 * lastOccurance = nullptr;
const utf8 * ch = str;
@@ -171,11 +171,11 @@ namespace String
if (lastOccurance == nullptr)
{
return SIZE_MAX;
return -1;
}
else
{
return (size_t)(lastOccurance - str);
return lastOccurance - str;
}
}