mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-20 17:31:08 +00:00
Fix assignment of nil to a structure.
constfold.c seems to be getting a little long in the tooth :P
This commit is contained in:
parent
8582e9de63
commit
f358364ef2
2 changed files with 6 additions and 3 deletions
|
@ -49,7 +49,7 @@ class_from_plist (PLDictionary *pldict)
|
|||
local SEL sel;
|
||||
local PLItem *item;
|
||||
|
||||
ret.quaternion_val = nil; //FIXME should be ret = nil;
|
||||
ret = nil;
|
||||
classname = [(PLString*) [pldict getObjectForKey:"Class"] string];
|
||||
class = obj_lookup_class (classname);
|
||||
if (!class) {
|
||||
|
@ -98,7 +98,7 @@ array_from_plist (PLArray *plarray)
|
|||
local int i, count;
|
||||
local @param ret;
|
||||
|
||||
ret.quaternion_val = nil; //FIXME should be ret = nil;
|
||||
ret = nil;
|
||||
array = [[Array alloc] init];
|
||||
count = [plarray count];
|
||||
for (i = 0; i < count; i++) {
|
||||
|
@ -155,7 +155,7 @@ object_from_plist (PLItem *plist)
|
|||
{
|
||||
local @param ret;
|
||||
|
||||
ret.quaternion_val = nil; //FIXME should be ret = nil;
|
||||
ret = nil;
|
||||
switch ([plist type]) {
|
||||
case QFDictionary:
|
||||
return class_from_plist ((PLDictionary *) plist);
|
||||
|
|
|
@ -876,6 +876,9 @@ do_op_invalid (int op, expr_t *e, expr_t *e1, expr_t *e2)
|
|||
{
|
||||
type_t *t1 = get_type (e1);
|
||||
type_t *t2 = get_type (e2);
|
||||
|
||||
if (e->e.expr.op == 'm')
|
||||
return e; // assume the rest of the compiler got it right
|
||||
if (is_scalar (t1) && is_scalar (t2)) {
|
||||
// one or both expressions are an enum, and the other is one of
|
||||
// int, float or short. Treat the enum as the other type, or as
|
||||
|
|
Loading…
Reference in a new issue