diff --git a/tinyxml2.h b/tinyxml2.h index 7586f7b8..eb02ea0d 100755 --- a/tinyxml2.h +++ b/tinyxml2.h @@ -24,7 +24,7 @@ distribution. #ifndef TINYXML2_INCLUDED #define TINYXML2_INCLUDED -#if defined(ANDROID_NDK) || defined(__BORLANDC__) || defined(__QNXNTO__) +#if defined(ANDROID_NDK) || defined(__BORLANDC__) || defined(__QNX__) # include # include # include diff --git a/xmltest.cpp b/xmltest.cpp index ae976042..25f2840c 100755 --- a/xmltest.cpp +++ b/xmltest.cpp @@ -45,13 +45,16 @@ bool XMLTest (const char* testString, const char* expected, const char* found, b printf (" %s\n", testString); } else { + const char* expectedString = (expected == NULL) ? "(null)" : expected; + const char* foundString = (found == NULL) ? "(null)" : found; + if ( extraNL ) { printf( " %s\n", testString ); - printf( "%s\n", expected ); - printf( "%s\n", found ); + printf( "%s\n", expectedString ); + printf( "%s\n", foundString ); } else { - printf (" %s [%s][%s]\n", testString, expected, found); + printf (" %s [%s][%s]\n", testString, expectedString, foundString); } }