Commit c4412dfa authored by Ocean Wang's avatar Ocean Wang
Browse files

[trac838] Check the value passed to isspace() is not less than 0

parent d098ac2e
......@@ -174,8 +174,10 @@ public:
return (*this);
}
void skipSpaces() {
while (base_ != base_end_ &&
isspace(static_cast<unsigned char>(*base_)))
// If *base_ < 0, on Windows platform with Visual Studio compiler
// it may trigger _ASSERTE((unsigned)(c + 1) <= 256);
// so make sure that the parameter of isspace() is larger than 0
while (base_ != base_end_ && ((*base_) >= 0) && isspace(*base_))
{
++base_;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment