mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 02:11:19 +00:00
Catch bogus comparison types.
This fixes an ICE when trying to compare a function with a float.
This commit is contained in:
parent
6288684fa2
commit
35de42aeac
1 changed files with 4 additions and 0 deletions
|
@ -1539,6 +1539,10 @@ binary_expr (int op, expr_t *e1, expr_t *e2)
|
|||
|
||||
type = t1;
|
||||
|
||||
if (is_compare (op)) {
|
||||
if (!type_assignable (t1, t2))
|
||||
return error (e1, "type mismatch for %s", get_op_string (op));
|
||||
}
|
||||
if (is_compare (op) || is_logic (op)) {
|
||||
if (options.code.progsversion > PROG_ID_VERSION)
|
||||
type = &type_integer;
|
||||
|
|
Loading…
Reference in a new issue