Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hello, Being a long time user of irrXML, I post some correction I made. Here the source code of each method I corrected. All are in CXMLReaderImpl.h Line 74 : I made parseCurrentNode() returning a boolean to correctly handle the end of file. So now read() look like: virtual bool read() Line 93 : It is not a big problem but this line cause a unsigned to signed conversion warning with VS2010 so: virtual int getAttributeCount() const Line 213 : parseCurrentNode() now returns a boolean. It returns false when it reach the end of file. bool parseCurrentNode() Line 424: In bad formated file, if closing bracket is missing, parseClosingXMLElement() crashed because there is no "end of file" check in this line. So the while condition : while(*P != L'>')become while(P && (unsigned int)(P - TextBegin) < TextSize - 1 && *P != 0 && *P != L'>') Line 542: Replacing special characters do not always copy all trailing characters because of the '<' comperand which must be a '<=' comperand. The comparaison becomes : if (oldPos <= origstr.size()-1) Line 614: UTF8 file are not detected with VS2010. data8[] element are signed extented to int (0xEF becomes 0xFFFFFFEF) while UTF8[] element are non signed extended to int (0xEF becomes 0xEF). So the condition is never true. We have to tell the compiler to do a non signed extension of data8[] elements. if (size >= 3 && data8[0] == UTF8[0] && data8[1] == UTF8[1] && data8[2] == UTF8[2])become if (size >= 3 && |
||||
|
Finally I implemented a true UTF8 to UNICODE conversion in convertTextData(). Line 659, the code TextData = new char_type[sizeWithoutHeader];become define MASKBITS 0x3F I hope this can help irrXML users to get the best of this good tool. |
||||
|
Thanks :) |
||||
|
At first glance the Menuki's fix looks correct and promising. It was done more than a half year ago. But I didn't see these changes in the available currently irrXML archive with sources. Does anybody have explanation why? Has irrXML available source repository and bug tracker? I can't find them in SF, but only IrrlichtEngine :( |
||||
|
Yes, irrXML isn't actively developed anymore, sorry. |
|