Wow, I wonder how many obscure crashes were happening because

of a bug in a 2-line function.  :)
This commit is contained in:
Glenn Maynard
2003-07-06 22:08:02 +00:00
parent a0bc9ef4f5
commit 61baf5992b
+1 -1
View File
@@ -461,7 +461,7 @@ void TrimRight(CString &str, const char *s)
void StripCrnl(CString &s)
{
while(s[s.size()-1] == '\r' || s[s.size()-1] == '\n')
while(s.size() && s[s.size()-1] == '\r' || s[s.size()-1] == '\n')
s.erase(s.size()-1);
}