mirror of
https://github.com/nzp-team/fteqw.git
synced 2024-11-26 22:01:50 +00:00
It would seem that there was a bug,
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@929 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
1baee5fbe1
commit
13d2da58bd
1 changed files with 5 additions and 2 deletions
|
@ -4913,9 +4913,9 @@ void QCC_PR_ParseStatement (void)
|
||||||
if (e == &def_ret)
|
if (e == &def_ret)
|
||||||
{ //copy it out, so our hack just below doesn't crash us
|
{ //copy it out, so our hack just below doesn't crash us
|
||||||
if (e->type->type == ev_vector)
|
if (e->type->type == ev_vector)
|
||||||
e = QCC_PR_Statement(pr_opcodes+OP_STORE_V, QCC_GetTemp(type_vector), e, NULL);
|
e = QCC_PR_Statement(pr_opcodes+OP_STORE_V, e, QCC_GetTemp(type_vector), NULL);
|
||||||
else
|
else
|
||||||
e = QCC_PR_Statement(pr_opcodes+OP_STORE_F, QCC_GetTemp(type_float), e, NULL);
|
e = QCC_PR_Statement(pr_opcodes+OP_STORE_F, e, QCC_GetTemp(type_float), NULL);
|
||||||
}
|
}
|
||||||
et = e->temp;
|
et = e->temp;
|
||||||
e->temp = NULL; //so noone frees it until we finish this loop
|
e->temp = NULL; //so noone frees it until we finish this loop
|
||||||
|
@ -5029,6 +5029,9 @@ void QCC_PR_ParseStatement (void)
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QCC_def_t *e3;
|
QCC_def_t *e3;
|
||||||
|
|
||||||
|
if (e->type->type != ev_float)
|
||||||
|
QCC_PR_ParseWarning(WARN_SWITCHTYPEMISMATCH, "switch caserange MUST be a float");
|
||||||
e2 = QCC_PR_Statement (&pr_opcodes[OP_GE], e, pr_casesdef[i], NULL);
|
e2 = QCC_PR_Statement (&pr_opcodes[OP_GE], e, pr_casesdef[i], NULL);
|
||||||
e3 = QCC_PR_Statement (&pr_opcodes[OP_LE], e, pr_casesdef2[i], NULL);
|
e3 = QCC_PR_Statement (&pr_opcodes[OP_LE], e, pr_casesdef2[i], NULL);
|
||||||
e2 = QCC_PR_Statement (&pr_opcodes[OP_AND], e2, e3, NULL);
|
e2 = QCC_PR_Statement (&pr_opcodes[OP_AND], e2, e3, NULL);
|
||||||
|
|
Loading…
Reference in a new issue