diff --git a/CMakeLists.txt b/CMakeLists.txt index b58f9eb..f0ae3dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,8 +10,8 @@ include(GNUInstallDirs) ################################ # set lib version here -set(GENERIC_LIB_VERSION "1.0.12") -set(GENERIC_LIB_SOVERSION "1") +set(GENERIC_LIB_VERSION "1.0.13") +set(GENERIC_LIB_SOVERSION "1") ################################ diff --git a/dox b/dox index 7ab99ff..2413b2e 100755 --- a/dox +++ b/dox @@ -32,7 +32,7 @@ PROJECT_NAME = "TinyXML-2" # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = 1.0.12 +PROJECT_NUMBER = 1.0.13 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 7e4ff40..50022f4 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -422,16 +422,19 @@ void XMLUtil::ToStr( bool v, char* buffer, int bufferSize ) TIXML_SNPRINTF( buffer, bufferSize, "%d", v ? 1 : 0 ); } - +/* + ToStr() of a number is a very tricky topic. + https://github.com/leethomason/tinyxml2/issues/106 +*/ void XMLUtil::ToStr( float v, char* buffer, int bufferSize ) { - TIXML_SNPRINTF( buffer, bufferSize, "%f", v ); + TIXML_SNPRINTF( buffer, bufferSize, "%.8g", v ); } void XMLUtil::ToStr( double v, char* buffer, int bufferSize ) { - TIXML_SNPRINTF( buffer, bufferSize, "%f", v ); + TIXML_SNPRINTF( buffer, bufferSize, "%.17g", v ); } @@ -497,12 +500,7 @@ char* XMLDocument::Identify( char* p, XMLNode** node ) } // What is this thing? - // - Elements start with a letter or underscore, but xml is reserved. - // - Comments: