Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » Unterminated processing info in XmlParser
Re: Unterminated processing info in XmlParser [message #43165 is a reply to message #43164] Sat, 24 May 2014 17:40 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
The obvious bug I can see is that ParseXml expects zero terminated string, but you are loading the exact size from the file, without adding zero at the end.

Try

String xml = LoadFile(path);
if(xml.IsVoid()) return false;


instead of

	FileIn iFile(path);
	
	if(!iFile.IsOpen())
	{
		return false;
	}
	
	int len = (int)iFile.GetSize();
	Buffer<char> pBuf;
	pBuf.Alloc(len);
	
	iFile.GetAll(pBuf,len);

	iFile.Close();

	String xml = ~pBuf;
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [FEATURE REQUEST] bool AMap::HasKey(K key) ;
Next Topic: C++11: Vector is missing copy contructor/assignment operator
Goto Forum:
  


Current Time: Mon Apr 29 01:56:16 CEST 2024

Total time taken to generate the page: 0.04996 seconds