I tried loading a file containing only 5 ' ' (space) characters and Parse accepted it. I had assumed that this file would be equivalent to an empty file, and would therefore result in TIXML_ERROR_DOCUMENT_EMPTY. Stepping thru the code it appears that a check for (*p ==0) is missing.
Also, when I tried loading a truly empty file I get false returned, but the error description is not set (seems like it again ought to be TIXML_ERROR_DOCUMENT_EMPTY). In this case it seems that a call to SetError is missing.
Greg
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Greetings,
I tried loading a file containing only 5 ' ' (space) characters and Parse accepted it. I had assumed that this file would be equivalent to an empty file, and would therefore result in TIXML_ERROR_DOCUMENT_EMPTY. Stepping thru the code it appears that a check for (*p ==0) is missing.
Also, when I tried loading a truly empty file I get false returned, but the error description is not set (seems like it again ought to be TIXML_ERROR_DOCUMENT_EMPTY). In this case it seems that a call to SetError is missing.
Greg
Which part of the code do you think is missing the check? (That'll save time in fixing it.)