fixed infinite loop (oops)

This commit is contained in:
David Anderson 2006-05-10 04:44:07 +00:00
parent 58209dfb37
commit f5cabb4bea

View File

@ -68,9 +68,9 @@ bool DecodeLibCmdString(const char *str, LibDecoder *dec)
dec->param2 = NULL; dec->param2 = NULL;
} else { } else {
dec->buffer = strdup(str); dec->buffer = strdup(str);
char *p = strchr(str, '_'); char *p = strchr(dec->buffer, '_');
while (p && (*(p+1) != '_')) while (p && (*(p+1) == '_'))
p = strchr(str, '_'); p = strchr(p+2, '_');
if (!p || !*(p+1)) if (!p || !*(p+1))
return false; return false;
*p = '\0'; *p = '\0';
@ -220,6 +220,8 @@ LibError RunLibCommand(const LibDecoder *enc)
expect = LibType_Library; expect = LibType_Library;
else if (enc->cmd == LibCmd_ExpectClass) else if (enc->cmd == LibCmd_ExpectClass)
expect = LibType_Class; expect = LibType_Class;
else
expect = LibType_Library;
/** see if it exists */ /** see if it exists */
for (; iter != end; iter++) for (; iter != end; iter++)