diff --git a/tinyxml2.cpp b/tinyxml2.cpp index a6ec20a..c13713f 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -425,13 +425,13 @@ void XMLUtil::ToStr( bool v, char* buffer, int bufferSize ) void XMLUtil::ToStr( float v, char* buffer, int bufferSize ) { - TIXML_SNPRINTF( buffer, bufferSize, "%g", v ); + TIXML_SNPRINTF( buffer, bufferSize, "%f", v ); } void XMLUtil::ToStr( double v, char* buffer, int bufferSize ) { - TIXML_SNPRINTF( buffer, bufferSize, "%g", v ); + TIXML_SNPRINTF( buffer, bufferSize, "%f", v ); } diff --git a/xmltest.cpp b/xmltest.cpp index e7da311..abb2f1b 100644 --- a/xmltest.cpp +++ b/xmltest.cpp @@ -301,9 +301,9 @@ int main( int argc, const char ** argv ) printf( "Test file '%s' loaded. ErrorID=%d\n", argv[1], errorID ); if ( !errorID ) { - printf( "Load time=%d\n", loadTime - startTime ); - printf( "Delete time=%d\n", deleteTime - loadTime ); - printf( "Total time=%d\n", deleteTime - startTime ); + printf( "Load time=%u\n", (unsigned)(loadTime - startTime) ); + printf( "Delete time=%u\n", (unsigned)(deleteTime - loadTime) ); + printf( "Total time=%u\n", (unsigned)(deleteTime - startTime) ); } exit(0); }