From 077d0445cd3fb7f93f0f2acfe61260292d256f21 Mon Sep 17 00:00:00 2001 From: nastys <@> Date: Sat, 23 Nov 2019 17:22:26 +0100 Subject: [PATCH] [Patches] Fix crash if the in-line comment is not long enough --- source-code/source/plugins/Patches/dllmain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source-code/source/plugins/Patches/dllmain.cpp b/source-code/source/plugins/Patches/dllmain.cpp index 5b0dfbb..256ef07 100644 --- a/source-code/source/plugins/Patches/dllmain.cpp +++ b/source-code/source/plugins/Patches/dllmain.cpp @@ -537,7 +537,7 @@ void ApplyCustomPatches(std::wstring CPATCH_FILE_STRING) issb >> std::setbase(16) >> byte; unsigned char byte_u = byte; std::cout << "[Patches] Patching: " << std::hex << address << ":" << std::hex << byte; - if (comment_string != "") + if (comment_counter < comment_string.length()) { std::cout << " #" << comment_string.at(comment_counter); comment_counter++;