From 22bfa0087c2f5a412015449fde8be23f50e4d152 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Tue, 24 Feb 2026 14:59:43 +0100 Subject: [PATCH] Minor code cleanup --- Core/FileSystems/ISOFileSystem.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Core/FileSystems/ISOFileSystem.cpp b/Core/FileSystems/ISOFileSystem.cpp index 4e2af27703..38e2c7b8b5 100644 --- a/Core/FileSystems/ISOFileSystem.cpp +++ b/Core/FileSystems/ISOFileSystem.cpp @@ -22,6 +22,7 @@ #include "Common/CommonTypes.h" #include "Common/Serialize/Serializer.h" #include "Common/Serialize/SerializeFuncs.h" +#include "Common/StringUtils.h" #include "Core/FileSystems/ISOFileSystem.h" #include "Core/HLE/sceKernel.h" #include "Core/MemMap.h" @@ -33,11 +34,11 @@ bool parseLBN(const std::string &filename, u32 *sectorStart, u32 *readSize) { // The format of this is: "/sce_lbn" "0x"? HEX* ANY* "_size" "0x"? HEX* ANY* // That means that "/sce_lbn/_size1/" is perfectly valid. // Most commonly, it looks like /sce_lbn0x10_size0x100 or /sce_lbn10_size100 (always hex.) - // If it doesn't starts with /sce_lbn or doesn't have _size, look for a file instead. - if (filename.compare(0, sizeof("/sce_lbn") - 1, "/sce_lbn") != 0) + if (!startsWith(filename, "/sce_lbn")) return false; - size_t size_pos = filename.find("_size"); + + const size_t size_pos = filename.find("_size"); if (size_pos == filename.npos) return false;