Resolve crash when printing malformed entities - issue 291
diff --git a/xmltest.cpp b/xmltest.cpp
index c231024..243628c 100644
--- a/xmltest.cpp
+++ b/xmltest.cpp
@@ -1416,6 +1416,16 @@
 		XMLPrinter printer;

 	}

 

+	{

+		// Issue 291. Should not crash

+		const char* xml = "&#0</a>";

+		XMLDocument doc;

+		doc.Parse( xml );

+

+		XMLPrinter printer;

+		doc.Print( &printer );

+	}

+

 	// ----------- Performance tracking --------------

 	{

 #if defined( _MSC_VER )