[Patches] Fix crash if the in-line comment is not long enough

This commit is contained in:
nastys
2019-11-23 17:22:26 +01:00
parent aa790fc58c
commit 077d0445cd
@@ -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++;