From 2a3c4eaf951d1378a9e08d53796f214f6776f7b1 Mon Sep 17 00:00:00 2001 From: nia Date: Tue, 22 Oct 2024 12:40:43 +0200 Subject: [PATCH] Fix a compilation error on some platforms. std::max expects both arguments to be the same type (in this case const char *), while the C version of strrchr returns non-const char *, which results in a type error with some C libraries. Signed-off-by: Nia Alarie --- Source/ee/PS2OS.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/ee/PS2OS.cpp b/Source/ee/PS2OS.cpp index f752c26777..339364c8bf 100644 --- a/Source/ee/PS2OS.cpp +++ b/Source/ee/PS2OS.cpp @@ -425,7 +425,7 @@ void CPS2OS::LoadELF(Framework::CStream* stream, const char* executablePath, con auto executableName = executablePath; for(const auto separator : separators) { - if(auto sepPos = strrchr(executablePath, separator)) + if(const char* sepPos = strrchr(executablePath, separator)) { executableName = std::max(executableName, sepPos + 1); }