From 09c6876ecbe641cd43ae99de552e95ef676c8b1d Mon Sep 17 00:00:00 2001 From: wwylele Date: Tue, 16 Aug 2016 11:35:37 +0800 Subject: [PATCH] LDR fixup! VerifyStringLength --- src/core/hle/service/ldr_ro.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/hle/service/ldr_ro.cpp b/src/core/hle/service/ldr_ro.cpp index d18c11321..1df874958 100644 --- a/src/core/hle/service/ldr_ro.cpp +++ b/src/core/hle/service/ldr_ro.cpp @@ -635,7 +635,7 @@ class CROHelper final { * @param size the size of the string, including the terminating 0 * @returns ResultCode RESULT_SUCCESS if the size matches, otherwise error code. */ - static ResultCode VerifyString(VAddr address, u32 size) { + static ResultCode VerifyStringLength(VAddr address, u32 size) { if (size != 0) { if (Memory::Read8(address + size - 1) != 0) return CROFormatError(0x0B); @@ -1575,7 +1575,7 @@ public: return result; } - result = VerifyString(GetField(ModuleNameOffset), GetField(ModuleNameSize)); + result = VerifyStringLength(GetField(ModuleNameOffset), GetField(ModuleNameSize)); if (result.IsError()) { LOG_ERROR(Service_LDR, "Error verifying module name %08X", result.raw); return result; @@ -1606,7 +1606,7 @@ public: return result; } - result = VerifyString(GetField(ExportStringsOffset), GetField(ExportStringsSize)); + result = VerifyStringLength(GetField(ExportStringsOffset), GetField(ExportStringsSize)); if (result.IsError()) { LOG_ERROR(Service_LDR, "Error verifying export strings %08X", result.raw); return result; @@ -1642,7 +1642,7 @@ public: return result; } - result = VerifyString(GetField(ImportStringsOffset), GetField(ImportStringsSize)); + result = VerifyStringLength(GetField(ImportStringsOffset), GetField(ImportStringsSize)); if (result.IsError()) { LOG_ERROR(Service_LDR, "Error verifying import strings %08X", result.raw); return result;