From a44da3c14dc81a60159dbb738a4a8e776a821dee Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Fri, 12 Aug 2022 10:19:44 -0400 Subject: ips_layer: Delimit parsed hex value string Delimits the hex value string on spaces, slashes, carriage returns or newlines, allowing for comments to be added in-line. --- src/core/file_sys/ips_layer.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/file_sys/ips_layer.cpp b/src/core/file_sys/ips_layer.cpp index 4b35ca82f..a33dbe94b 100644 --- a/src/core/file_sys/ips_layer.cpp +++ b/src/core/file_sys/ips_layer.cpp @@ -287,7 +287,8 @@ void IPSwitchCompiler::Parse() { std::copy(value.begin(), value.end(), std::back_inserter(replace)); } else { // hex replacement - const auto value = patch_line.substr(9); + const auto value = + patch_line.substr(9, patch_line.find_first_of(" /\r\n", 9) - 9); replace = Common::HexStringToVector(value, is_little_endian); } -- cgit v1.2.3