mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
[qfcc] Allow short constants in expr_int
No point in generating an internal error when the value can be converted to an int.
This commit is contained in:
parent
8d435040e6
commit
40f5b8a482
1 changed files with 3 additions and 0 deletions
|
@ -1160,6 +1160,9 @@ expr_int (expr_t *e)
|
|||
if (e->type == ex_value && e->e.value->lltype == ev_int) {
|
||||
return e->e.value->v.int_val;
|
||||
}
|
||||
if (e->type == ex_value && e->e.value->lltype == ev_short) {
|
||||
return e->e.value->v.short_val;
|
||||
}
|
||||
if (e->type == ex_symbol && e->e.symbol->sy_type == sy_const
|
||||
&& (e->e.symbol->type->type == ev_int
|
||||
|| is_enum (e->e.symbol->type))) {
|
||||
|
|
Loading…
Reference in a new issue