fixed previous change

This commit is contained in:
lustar.mii 2009-06-11 18:33:51 +00:00
parent 0c2c543f46
commit 1b4d69bd6e

View File

@ -175,7 +175,6 @@ bool OpenXMLFile(char *filename)
} else { } else {
//if (xmldebug); //if (xmldebug);
// xmlloadtime = dbg_time2(NULL); // xmlloadtime = dbg_time2(NULL);
nodetree = emptynode;
return true; return true;
} }
} }
@ -373,8 +372,9 @@ bool LoadGameInfoFromXML(char* gameid, char* langtxt)
/* gameid: full game id */ /* gameid: full game id */
/* langcode: "English","French","German" */ /* langcode: "English","French","German" */
{ {
if (nodeindex == NULL || nodedata == NULL) bool exist=false;
return; if (nodeindex == NULL)
return exist;
/* convert language text into ISO 639 two-letter language codes */ /* convert language text into ISO 639 two-letter language codes */
char langcode[100] = ""; char langcode[100] = "";
@ -390,6 +390,7 @@ bool LoadGameInfoFromXML(char* gameid, char* langtxt)
/* search for game matching gameid */ /* search for game matching gameid */
while (1) while (1)
{ {
exist=true;
nodeid = mxmlIndexFind(nodeindex,"id", NULL); nodeid = mxmlIndexFind(nodeindex,"id", NULL);
if (nodeid != NULL) { if (nodeid != NULL) {
get_text(nodeid, element_text, sizeof(element_text)); get_text(nodeid, element_text, sizeof(element_text));