diff options
| author | 2022-08-12 10:19:44 -0400 | |
|---|---|---|
| committer | 2022-08-12 10:19:44 -0400 | |
| commit | a44da3c14dc81a60159dbb738a4a8e776a821dee (patch) | |
| tree | 7272d0720c23d5c4b3d9bed711c371af87befe1a | |
| parent | Merge pull request #8686 from lat9nq/graft-source (diff) | |
| download | yuzu-a44da3c14dc81a60159dbb738a4a8e776a821dee.tar.gz yuzu-a44da3c14dc81a60159dbb738a4a8e776a821dee.tar.xz yuzu-a44da3c14dc81a60159dbb738a4a8e776a821dee.zip | |
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.
| -rw-r--r-- | src/core/file_sys/ips_layer.cpp | 3 |
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() { | |||
| 287 | std::copy(value.begin(), value.end(), std::back_inserter(replace)); | 287 | std::copy(value.begin(), value.end(), std::back_inserter(replace)); |
| 288 | } else { | 288 | } else { |
| 289 | // hex replacement | 289 | // hex replacement |
| 290 | const auto value = patch_line.substr(9); | 290 | const auto value = |
| 291 | patch_line.substr(9, patch_line.find_first_of(" /\r\n", 9) - 9); | ||
| 291 | replace = Common::HexStringToVector(value, is_little_endian); | 292 | replace = Common::HexStringToVector(value, is_little_endian); |
| 292 | } | 293 | } |
| 293 | 294 | ||