fix name parsing to accept additional lead characters
diff --git a/tinyxml2.cpp b/tinyxml2.cpp
index 86a76a9..87063d3 100644
--- a/tinyxml2.cpp
+++ b/tinyxml2.cpp
@@ -134,16 +134,12 @@
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;
}