From 5f16e462823e8be371385c7fbca8d9f71e113a06 Mon Sep 17 00:00:00 2001 From: gibbed Date: Sat, 9 Jun 2018 01:22:45 -0500 Subject: [PATCH] [Core] Do a case-insensitive compare for extension when launching a path. Fixes #1175. --- src/xenia/emulator.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/xenia/emulator.cc b/src/xenia/emulator.cc index a38e87149..51b07ee06 100644 --- a/src/xenia/emulator.cc +++ b/src/xenia/emulator.cc @@ -224,8 +224,11 @@ X_STATUS Emulator::LaunchPath(std::wstring path) { if (last_dot == std::wstring::npos) { // Likely an STFS container. return LaunchStfsContainer(path); - } else if (path.substr(last_dot) == L".xex" || - path.substr(last_dot) == L".elf") { + }; + auto extension = path.substr(last_dot); + std::transform(extension.begin(), extension.end(), extension.begin(), + tolower); + if (extension == L".xex" || extension == L".elf") { // Treat as a naked xex file. return LaunchXexFile(path); } else {