Allow building with older GCC

This commit is contained in:
Simon Lindholm
2022-07-04 19:27:23 +02:00
parent 228bf4663e
commit a47a2e5e8b
2 changed files with 4 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
#include "common.h"
#include "files.h"
#include <algorithm>
namespace files {
static FILE *handleFps[0x10000];
@@ -14,7 +15,7 @@ namespace files {
std::replace(str.begin(), str.end(), '\\', '/');
// Remove the drive letter
if (str.starts_with("c:/") || str.starts_with("C:/")) {
if (str.rfind("c:/", 0) == 0 || str.rfind("C:/", 0) == 0) {
str.erase(0, 2);
}