fix name parsing to accept additional lead characters
This commit is contained in:
10
tinyxml2.cpp
10
tinyxml2.cpp
@@ -134,16 +134,12 @@ char* StrPair::ParseName( char* p )
|
||||
return 0;
|
||||
}
|
||||
|
||||
if ( !XMLUtil::IsAlpha( *p ) ) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
while( *p && (
|
||||
XMLUtil::IsAlphaNum( (unsigned char) *p )
|
||||
|| *p == '_'
|
||||
|| *p == '-'
|
||||
|| *p == '.'
|
||||
|| *p == ':' ))
|
||||
|| *p == ':'
|
||||
|| (*p == '-' && p>start ) // can be in a name, but not lead it.
|
||||
|| (*p == '.' && p>start ) )) // can be in a name, but not lead it.
|
||||
{
|
||||
++p;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user