From d669c3b3108011be7560f7eb6d06db32636774a9 Mon Sep 17 00:00:00 2001 From: Kirk McKusick Date: Wed, 15 Jul 1981 22:58:41 -0800 Subject: [PATCH] rmdel -r1.13 SCCS-vsn: usr.bin/pascal/px/interp.c 1.15 --- usr/src/usr.bin/pascal/px/interp.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/usr/src/usr.bin/pascal/px/interp.c b/usr/src/usr.bin/pascal/px/interp.c index 35476ea54f..406afb0e86 100644 --- a/usr/src/usr.bin/pascal/px/interp.c +++ b/usr/src/usr.bin/pascal/px/interp.c @@ -1,6 +1,6 @@ /* Copyright (c) 1979 Regents of the University of California */ -static char sccsid[] = "@(#)interp.c 1.14 %G%"; +static char sccsid[] = "@(#)interp.c 1.15 %G%"; #include #include "whoami.h" @@ -217,6 +217,7 @@ interpreter(base) continue; case O_FCALL: pc.cp++; + tcp = popaddr(); /* ptr to display save area */ tfp = (struct formalrtn *)popaddr(); stp = (struct stack *) pushsp((long)(sizeof(struct stack))); @@ -226,7 +227,7 @@ interpreter(base) pc.cp = tfp->fentryaddr;/* calc new entry point */ _dp = &_display.frame[tfp->fbn];/* new display ptr */ blkcpy(tfp->fbn * sizeof(struct disp), - &_display.frame[1], &tfp->fdisp[tfp->fbn]); + &_display.frame[1], tcp); blkcpy(tfp->fbn * sizeof(struct disp), &tfp->fdisp[0], &_display.frame[1]); continue; @@ -236,13 +237,16 @@ interpreter(base) tl = *pc.usp++; tcp = pushsp((long)(0)); tfp = *(struct formalrtn **)(tcp + tl); + tcp1 = *(char **) + (tcp + tl + sizeof(struct formalrtn *)); if (tl != 0) { - blkcpy(tl, tcp, - tcp + sizeof(struct formalrtn *)); + blkcpy(tl, tcp, tcp + sizeof(struct formalrtn *) + + sizeof(char *)); } - popsp((long)(sizeof(struct formalrtn *))); + popsp((long) + (sizeof(struct formalrtn *) + sizeof (char *))); blkcpy(tfp->fbn * sizeof(struct disp), - &tfp->fdisp[tfp->fbn], &_display.frame[1]); + tcp1, &_display.frame[1]); continue; case O_FSAV: tfp = (struct formalrtn *)popaddr(); -- 2.20.1