From 21f996960d09fe468ff3ff522f06ed6df6ee88fd Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Mon, 3 Oct 2016 13:01:57 +0300 Subject: [PATCH] Assertions in string comparison --- tinyxml2.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tinyxml2.h b/tinyxml2.h index 8d5eb2a..fbfe4f6 100755 --- a/tinyxml2.h +++ b/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; }