diff options
author | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2006-11-10 13:09:40 +0000 |
---|---|---|
committer | sje <sje@4f64403b-2f21-0410-a795-97e2b3489a10> | 2006-11-10 13:09:40 +0000 |
commit | 16e313ad1d508f3d73f901a8811f1cc26963604b (patch) | |
tree | 5d5e51acd96b0c9170f2bec3a6b55bd3562dc4d0 /tipper/subst.cpp | |
parent | c0f738e443f7eb2b3a4c822545ec485f3cea1d88 (diff) |
fix to bbcode striping routine
git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@38 4f64403b-2f21-0410-a795-97e2b3489a10
Diffstat (limited to 'tipper/subst.cpp')
-rw-r--r-- | tipper/subst.cpp | 2 |
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; |