#include <sl.h>
+//#define PLIST_DEBUG 1 // whether to report detailed parsing errors
+
#define kXMLTagPList "plist"
#define kXMLTagDict "dict"
#define kXMLTagKey "key"
}
}
- *dict = moduleDict;
+ if (length != -1) {
+ *dict = moduleDict;
#if PLIST_DEBUG
- if (length == -1)
- printf("ParseXML gagged (-1) after %s (%d tags); buf+pos: %s\n",
+ } else {
+ printf("ParseXML gagged (-1) after '%s' (%d tags); buf+pos: %s\n",
gLastTag,gTagsParsed,buffer+pos);
#endif
+ }
// for tidyness even though kext parsing resets all of malloc
FreeTagCache();