Fix infinite loop in VString::replaceSubstr

If the replaced string was a suffix of the replacement, we used to get
an infinite loop.
This commit is contained in:
Geza Lore
2025-08-05 14:41:38 +01:00
parent 2c41a7bbf6
commit 25d968b833
3 changed files with 12 additions and 4 deletions
+2
View File
@@ -143,6 +143,8 @@ public:
static string aOrAn(const string& word) { return aOrAn(word.c_str()); }
// Hash the string
static uint64_t hashMurmur(const string& str) VL_PURE;
static void selfTest(); // Test this class
};
//######################################################################