summaryrefslogtreecommitdiff
path: root/tipper/subst.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tipper/subst.cpp')
-rw-r--r--tipper/subst.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/tipper/subst.cpp b/tipper/subst.cpp
index 5eb6e49..7f43b51 100644
--- a/tipper/subst.cpp
+++ b/tipper/subst.cpp
@@ -14,7 +14,7 @@ void StripBBCodesInPlace(wchar_t *text) {
if(text[read] != text[write]) text[write] = text[read];
read++; write++;
}
- if(read == len) break;
+ if(read > len) break;
if(len - read >= 3 && (wcsnicmp(text + read, L"[b]", 3) == 0 || wcsnicmp(text + read, L"[i]", 3) == 0))
read += 3;