mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 22:01:50 +00:00
Fix a stupid bug which caused ifstring not to work (use typecmp instead of
a pointer comparison). >_< git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1240 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
e339bfa096
commit
0f1a586272
1 changed files with 4 additions and 4 deletions
|
@ -4637,7 +4637,7 @@ void QCC_PR_ParseStatement (void)
|
||||||
else
|
else
|
||||||
patch1 = NULL;
|
patch1 = NULL;
|
||||||
}
|
}
|
||||||
else if (e->type == type_string) //special case, as strings are now pointers, not offsets from string table
|
else if (!typecmp( e->type, type_string)) //special case, as strings are now pointers, not offsets from string table
|
||||||
{
|
{
|
||||||
QCC_PR_ParseWarning(0, "while (string) can result in bizzare behaviour");
|
QCC_PR_ParseWarning(0, "while (string) can result in bizzare behaviour");
|
||||||
QCC_FreeTemp(QCC_PR_Statement (&pr_opcodes[OP_IFNOTS], e, 0, &patch1));
|
QCC_FreeTemp(QCC_PR_Statement (&pr_opcodes[OP_IFNOTS], e, 0, &patch1));
|
||||||
|
@ -4796,7 +4796,7 @@ void QCC_PR_ParseStatement (void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (e->type == type_string && flag_ifstring)
|
if (!typecmp( e->type, type_string))
|
||||||
{
|
{
|
||||||
QCC_PR_ParseWarning(WARN_IFSTRING_USED, "do {} while(string) can result in bizzare behaviour");
|
QCC_PR_ParseWarning(WARN_IFSTRING_USED, "do {} while(string) can result in bizzare behaviour");
|
||||||
QCC_FreeTemp(QCC_PR_Statement (&pr_opcodes[OP_IFS], e, NULL, &patch2));
|
QCC_FreeTemp(QCC_PR_Statement (&pr_opcodes[OP_IFS], e, NULL, &patch2));
|
||||||
|
@ -4890,7 +4890,7 @@ void QCC_PR_ParseStatement (void)
|
||||||
|
|
||||||
if (negate)
|
if (negate)
|
||||||
{
|
{
|
||||||
if (e->type == type_string && flag_ifstring) //special case, as strings are now pointers, not offsets from string table
|
if (!typecmp( e->type, type_string)) //special case, as strings are now pointers, not offsets from string table
|
||||||
{
|
{
|
||||||
QCC_PR_ParseWarning(WARN_IFSTRING_USED, "if not(string) can result in bizzare behaviour");
|
QCC_PR_ParseWarning(WARN_IFSTRING_USED, "if not(string) can result in bizzare behaviour");
|
||||||
QCC_FreeTemp(QCC_PR_Statement (&pr_opcodes[OP_IFS], e, 0, &patch1));
|
QCC_FreeTemp(QCC_PR_Statement (&pr_opcodes[OP_IFS], e, 0, &patch1));
|
||||||
|
@ -4900,7 +4900,7 @@ void QCC_PR_ParseStatement (void)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (e->type == type_string && flag_ifstring) //special case, as strings are now pointers, not offsets from string table
|
if (!typecmp( e->type, type_string)) //special case, as strings are now pointers, not offsets from string table
|
||||||
{
|
{
|
||||||
QCC_PR_ParseWarning(WARN_IFSTRING_USED, "if (string) can result in bizzare behaviour");
|
QCC_PR_ParseWarning(WARN_IFSTRING_USED, "if (string) can result in bizzare behaviour");
|
||||||
QCC_FreeTemp(QCC_PR_Statement (&pr_opcodes[OP_IFNOTS], e, 0, &patch1));
|
QCC_FreeTemp(QCC_PR_Statement (&pr_opcodes[OP_IFNOTS], e, 0, &patch1));
|
||||||
|
|
Loading…
Reference in a new issue