Skip to content

Commit

Permalink
Merge pull request #816 from a-lunkov/master
Browse files Browse the repository at this point in the history
Suppress UndefinedBehaviorSanitizer warnings
  • Loading branch information
leethomason committed Jun 14, 2020
2 parents 098eb37 + a953b95 commit 2e6912b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tinyxml2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -234,13 +234,13 @@ char* StrPair::ParseName( char* p )
if ( !p || !(*p) ) {
return 0;
}
if ( !XMLUtil::IsNameStartChar( *p ) ) {
if ( !XMLUtil::IsNameStartChar( (unsigned char) *p ) ) {
return 0;
}

char* const start = p;
++p;
while ( *p && XMLUtil::IsNameChar( *p ) ) {
while ( *p && XMLUtil::IsNameChar( (unsigned char) *p ) ) {
++p;
}

Expand Down Expand Up @@ -1909,7 +1909,7 @@ char* XMLElement::ParseAttributes( char* p, int* curLineNumPtr )
}

// attribute.
if (XMLUtil::IsNameStartChar( *p ) ) {
if (XMLUtil::IsNameStartChar( (unsigned char) *p ) ) {
XMLAttribute* attrib = CreateAttribute();
TIXMLASSERT( attrib );
attrib->_parseLineNum = _document->_parseCurLineNum;
Expand Down

0 comments on commit 2e6912b

Please sign in to comment.