commit | f68c438ee2d4784b4e68cf8097c18d7ae69dad34 | [log] [tgz] |
---|---|---|
author | Lee Thomason <leethomason@gmail.com> | Sat Apr 28 14:37:11 2012 -0700 |
committer | Lee Thomason <leethomason@gmail.com> | Sat Apr 28 14:37:11 2012 -0700 |
tree | 16a007f4cad2dd4661c4cdbea18b7da16bfbca5b | |
parent | 0aa8a80fd7cd1c73682a3cdfdc46d48f037c48e5 [diff] [blame] |
added new test for BOM, and added good defaults for NewDeclaration
diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 67bf205..297c966 100644 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp
@@ -1351,7 +1351,7 @@ { XMLDeclaration* dec = new (commentPool.Alloc()) XMLDeclaration( this ); dec->memPool = &commentPool; - dec->SetValue( str ); + dec->SetValue( str ? str : "xml version=\"1.0\" encoding=\"UTF-8\"" ); return dec; }