summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2022-08-12 14:12:10 -0700
committerGitHub <noreply@github.com>2022-08-12 14:12:10 -0700
commitcba3b05c94776bebae07b3af0b8d7dcf0516cfff (patch)
treef09b370c13ca2b98bf6025b5c274b728186cb032
parentce42465638b5beca5d2e4fe0fe86b2f6afe2b5b2 (diff)
parenta44da3c14dc81a60159dbb738a4a8e776a821dee (diff)
Merge pull request #8755 from Morph1984/delimit-ips
ips_layer: Delimit parsed hex value string
-rw-r--r--src/core/file_sys/ips_layer.cpp3
1 files changed, 2 insertions, 1 deletions
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);
}