diff options
| author | Leonetienne <leonetienne@hotmail.de> | 2022-02-12 04:19:42 +0100 |
|---|---|---|
| committer | Leonetienne <leonetienne@hotmail.de> | 2022-02-12 04:19:42 +0100 |
| commit | 77bd8913d3e5822c3d17cad17059228e3acaf22d (patch) | |
| tree | 7370fb8842da15b6b34ad31e07b34cc35503187a | |
| parent | 78db217817a5a05d76f40f987575542c8b1c54f6 (diff) | |
Fixed issue twat caused some text to be lost duwing kawaisation
| -rw-r--r-- | main.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -177,8 +177,8 @@ std::string ReplaceButKeepSigns( } else { - // We do not have an occurrence... just insert the char as is - ss << str[i]; + // We do not have an occurrence... just insert the subsection found as is (next iteration will start behind it) + ss << foundInText; } // Advance i accordingly @@ -304,7 +304,8 @@ std::string MakeUwu(std::string boringString) { "ll", "ww", [boringString](const std::string &found, int index) { - if (boringString.length() < found.length()) + // Don't replace, if we are on the last char + if (index + found.length() == boringString.length() - 1) return false; const char nextChar = MakeLower(boringString[index + found.length()]); |
