mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 14:55:36 +03:00
fixed infinite loop (oops)
This commit is contained in:
parent
58209dfb37
commit
f5cabb4bea
@ -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++)
|
||||||
|
Loading…
Reference in New Issue
Block a user