replace calls to isspace() with is_space() to avoid asserts in the CRT

This commit is contained in:
Arvid Norberg 2012-01-13 12:06:50 +00:00
parent 2af0ab6e2f
commit cbe02221cd
1 changed files with 3 additions and 3 deletions

View File

@ -175,11 +175,11 @@ namespace libtorrent
for (char* i = tag_name_end; i < tag_end; ++i)
{
// find start of attribute name
for (; i != tag_end && isspace(*i); ++i);
for (; i != tag_end && is_space(*i); ++i);
if (i == tag_end) break;
start = i;
// find end of attribute name
for (; i != tag_end && *i != '=' && !isspace(*i); ++i);
for (; i != tag_end && *i != '=' && !is_space(*i); ++i);
char* name_end = i;
// look for equality sign
@ -195,7 +195,7 @@ namespace libtorrent
}
++i;
for (; i != tag_end && isspace(*i); ++i);
for (; i != tag_end && is_space(*i); ++i);
// check for parse error (values must be quoted)
if (i == tag_end || (*i != '\'' && *i != '\"'))
{