Merge pull request #278 from Dmitry-Me/wrongBoundConstraints

Use proper constraints for int variable
diff --git a/tinyxml2.cpp b/tinyxml2.cpp
index dd8e3fd..ca6c566 100755
--- a/tinyxml2.cpp
+++ b/tinyxml2.cpp
@@ -1997,6 +1997,7 @@
         // Close out and re-start the va-args

         va_end( va );

         va_start( va, format );

+        TIXMLASSERT( _buffer.Size() > 0 && _buffer[_buffer.Size() - 1] == 0 );

         char* p = _buffer.PushArr( len ) - 1;	// back up over the null terminator.

 #if defined(_MSC_VER) && (_MSC_VER >= 1400 )

 		#if defined(WINCE)

diff --git a/tinyxml2.h b/tinyxml2.h
index f571032..799ca96 100755
--- a/tinyxml2.h
+++ b/tinyxml2.h
@@ -215,7 +215,7 @@
 class DynArray

 {

 public:

-    DynArray< T, INIT >() {

+    DynArray() {

         _mem = _pool;

         _allocated = INIT;

         _size = 0;

@@ -276,6 +276,7 @@
     }

 

     int Size() const					{

+        TIXMLASSERT( _size >= 0 );

         return _size;

     }