Wow, I wonder how many obscure crashes were happening because
of a bug in a 2-line function. :)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user