From 4e636381fdd4aaa3318b4d4774befe482bce8981 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 9 Jan 2022 20:16:05 +0100 Subject: [PATCH] fix: Magic and EOF value for IPS and IPS32 patches not getting added properly --- plugins/libimhex/source/helpers/patches.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/libimhex/source/helpers/patches.cpp b/plugins/libimhex/source/helpers/patches.cpp index 2a2e95479..8c21c1ec6 100644 --- a/plugins/libimhex/source/helpers/patches.cpp +++ b/plugins/libimhex/source/helpers/patches.cpp @@ -8,7 +8,7 @@ namespace hex { - static void pushBytesBack(std::vector &buffer, const std::string &string) { + static void pushStringBack(std::vector &buffer, const std::string &string) { std::copy(string.begin(), string.end(), std::back_inserter(buffer)); } @@ -21,7 +21,7 @@ namespace hex { std::vector generateIPSPatch(const Patches &patches) { std::vector result; - pushBytesBack(result, "PATCH"); + pushStringBack(result, "PATCH"); std::vector addresses; std::vector values; @@ -59,7 +59,7 @@ namespace hex { } } - pushBytesBack(result, "EOF"); + pushStringBack(result, "EOF"); return result; } @@ -67,7 +67,7 @@ namespace hex { std::vector generateIPS32Patch(const Patches &patches) { std::vector result; - pushBytesBack(result, "IPS32"); + pushStringBack(result, "IPS32"); std::vector addresses; std::vector values; @@ -105,7 +105,7 @@ namespace hex { } } - pushBytesBack(result, "EEOF"); + pushStringBack(result, "EEOF"); return result; }