must check for NIL pointer
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Wed, 17 Apr 1985 09:29:03 +0000 (01:29 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Wed, 17 Apr 1985 09:29:03 +0000 (01:29 -0800)
SCCS-vsn: usr.bin/pascal/src/call.c 2.3

usr/src/usr.bin/pascal/src/call.c

index 23a5e4f..5f7dde5 100644 (file)
@@ -1,7 +1,7 @@
 /* Copyright (c) 1979 Regents of the University of California */
 
 #ifndef lint
 /* Copyright (c) 1979 Regents of the University of California */
 
 #ifndef lint
-static char sccsid[] = "@(#)call.c 2.2 %G%";
+static char sccsid[] = "@(#)call.c 2.3 %G%";
 #endif
 
 #include "whoami.h"
 #endif
 
 #include "whoami.h"
@@ -223,7 +223,7 @@ call(p, argv_node, porf, psbn)
                                break;
                        }
                        p2 = p1->type;
                                break;
                        }
                        p2 = p1->type;
-                       if (p2->chain->class != CRANGE) {
+                       if (p2 == NLNIL || p2->chain->class != CRANGE) {
                            if (q != p2) {
                                error("Parameter type not identical to type of var parameter %s of %s", p1->symbol, p->symbol);
                                chk = FALSE;
                            if (q != p2) {
                                error("Parameter type not identical to type of var parameter %s of %s", p1->symbol, p->symbol);
                                chk = FALSE;