Explorar el Código

Merge pull request #482 from Dmitry-Me/stringEqualAssertions

Assertions in string comparison
Lee Thomason hace 9 años
padre
commit
0d3de1edbe
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      tinyxml2.h

+ 3 - 0
tinyxml2.h

@@ -570,6 +570,9 @@ public:
         if ( p == q ) {
             return true;
         }
+        TIXMLASSERT( p );
+        TIXMLASSERT( q );
+        TIXMLASSERT( nChar >= 0 );
         return strncmp( p, q, nChar ) == 0;
     }