I spotted some bugs

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@609 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2004-12-09 23:45:57 +00:00
parent bc124b1723
commit 4389d1480d

View file

@ -3765,10 +3765,12 @@ QCC_def_t *QCC_PR_Term (void)
} }
else if (QCC_PR_Check ("*")) else if (QCC_PR_Check ("*"))
{ {
int st = numstatements;
e = QCC_PR_Expression (NOT_PRIORITY); e = QCC_PR_Expression (NOT_PRIORITY);
t = e->type->type; t = e->type->type;
if (t != ev_pointer)
QCC_PR_ParseError (ERR_BADNOTTYPE, "type mismatch for *");
switch(e->type->aux_type->type) switch(e->type->aux_type->type)
{ {
case ev_float: case ev_float:
@ -3797,7 +3799,7 @@ QCC_def_t *QCC_PR_Term (void)
break; break;
default: default:
QCC_PR_ParseError (ERR_BADNOTTYPE, "type mismatch for *"); QCC_PR_ParseError (ERR_BADNOTTYPE, "type mismatch for * (unrecognised type)");
break; break;
} }
@ -3808,7 +3810,7 @@ QCC_def_t *QCC_PR_Term (void)
{ {
e = QCC_PR_Expression (NOT_PRIORITY); e = QCC_PR_Expression (NOT_PRIORITY);
switch(e->type->aux_type->type) switch(e->type->type)
{ {
case ev_float: case ev_float:
e2 = QCC_PR_Statement (&pr_opcodes[OP_SUB_F], QCC_MakeFloatDef(0), e, NULL); e2 = QCC_PR_Statement (&pr_opcodes[OP_SUB_F], QCC_MakeFloatDef(0), e, NULL);
@ -3826,7 +3828,7 @@ QCC_def_t *QCC_PR_Term (void)
{ {
e = QCC_PR_Expression (NOT_PRIORITY); e = QCC_PR_Expression (NOT_PRIORITY);
switch(e->type->aux_type->type) switch(e->type->type)
{ {
case ev_float: case ev_float:
e2 = QCC_PR_Statement (&pr_opcodes[OP_ADD_F], QCC_MakeFloatDef(0), e, NULL); e2 = QCC_PR_Statement (&pr_opcodes[OP_ADD_F], QCC_MakeFloatDef(0), e, NULL);