code for '*(ip = iarr) = x' was wrong
authoreck <none@none>
Wed, 4 Apr 1990 15:08:45 +0000 (15:08 +0000)
committereck <none@none>
Wed, 4 Apr 1990 15:08:45 +0000 (15:08 +0000)
lang/cem/cemcom.ansi/ch3mon.c

index b779486..fc82a45 100644 (file)
@@ -42,7 +42,9 @@ ch3mon(oper, expp)
                                    symbol2str((*expp)->ex_type->tp_fund));
                } else {
                        expr = *expp;
-                       if (expr->ex_lvalue == 0 && expr->ex_class != String)
+                       if ((expr->ex_type->tp_fund == ARRAY
+                               && expr->ex_class != String)
+                           || expr->ex_type->tp_fund == FUNCTION)
                                /* dereference in administration only */
                                expr->ex_type = expr->ex_type->tp_up;
                        else    /* runtime code */