From 51165f6061a568d922895592a3f9c136f805367a Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Wed, 24 May 2023 18:56:51 +0100 Subject: [PATCH] Patches: Fix parsing of double words. Expand error log. --- pcsx2/Patch.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pcsx2/Patch.cpp b/pcsx2/Patch.cpp index a3ff054e96..29e5bc51e7 100644 --- a/pcsx2/Patch.cpp +++ b/pcsx2/Patch.cpp @@ -262,15 +262,15 @@ namespace PatchFunc std::string_view addr_end, data_end; const std::optional addr = StringUtil::FromChars(pieces[2], 16, &addr_end); - const std::optional data = StringUtil::FromChars(pieces[4], 16, &data_end); + const std::optional data = StringUtil::FromChars(pieces[4], 16, &data_end); if (!addr.has_value() || !addr_end.empty()) { - PATCH_ERROR("Malformed address '%.*s', a hex number is expected", static_cast(pieces[2].size()), pieces[2].data()); + PATCH_ERROR("Malformed address '%.*s', a hex number without prefix (e.g. 0123ABCD) is expected", static_cast(pieces[2].size()), pieces[2].data()); return; } else if (!data.has_value() || !data_end.empty()) { - PATCH_ERROR("Malformed data '%.*s', a hex number is expected", static_cast(pieces[4].size()), pieces[4].data()); + PATCH_ERROR("Malformed data '%.*s', a hex number without prefix (e.g. 0123ABCD) is expected", static_cast(pieces[4].size()), pieces[4].data()); return; }