mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-18 23:43:12 +00:00
[qfcc] Check handle types correctly
They can have a variety (min int and long) of backing types, so requiring ev_invalid (which is used for struct and union). Also, ensure is_int etc fail for handle types.
This commit is contained in:
parent
355ee12c3f
commit
cd051e8f9f
1 changed files with 4 additions and 1 deletions
|
@ -1252,6 +1252,9 @@ encode_type (dstring_t *encoding, const type_t *type)
|
|||
int is_##t (const type_t *type) \
|
||||
{ \
|
||||
type = unalias_type (type); \
|
||||
if (type->meta != ty_basic && type->meta != ty_algebra) { \
|
||||
return 0; \
|
||||
} \
|
||||
return type->type == ev_##t; \
|
||||
}
|
||||
#include "QF/progs/pr_type_names.h"
|
||||
|
@ -1357,7 +1360,7 @@ int
|
|||
is_handle (const type_t *type)
|
||||
{
|
||||
type = unalias_type (type);
|
||||
if (type->type == ev_invalid && type->meta == ty_handle)
|
||||
if (type->meta == ty_handle)
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue