summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonetienne <leonetienne@hotmail.de>2022-02-12 04:19:42 +0100
committerLeonetienne <leonetienne@hotmail.de>2022-02-12 04:19:42 +0100
commit77bd8913d3e5822c3d17cad17059228e3acaf22d (patch)
tree7370fb8842da15b6b34ad31e07b34cc35503187a
parent78db217817a5a05d76f40f987575542c8b1c54f6 (diff)
Fixed issue twat caused some text to be lost duwing kawaisation
-rw-r--r--main.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/main.cpp b/main.cpp
index 9bf8b2f..717b943 100644
--- a/main.cpp
+++ b/main.cpp
@@ -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()]);