From: ceriel Date: Wed, 4 Apr 1990 14:52:29 +0000 (+0000) Subject: Fixed wrong assertion, and fixed bug in distance routine: it did not check X-Git-Tag: release-5-5~1757 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=16ef0467a8919b7df4957718e3dcca48754c08ff;p=ack.git Fixed wrong assertion, and fixed bug in distance routine: it did not check that each stackpattern token that does not exactly match can be made from the stack --- diff --git a/mach/proto/ncg/codegen.c b/mach/proto/ncg/codegen.c index 0e54d1e6c..e7c64ef15 100644 --- a/mach/proto/ncg/codegen.c +++ b/mach/proto/ncg/codegen.c @@ -152,7 +152,7 @@ unsigned codegen(codep,ply,toplevel,costlimit,forced) byte *codep; unsigned cost int j, nargs; getint(i,bp); getint(nargs,bp); - assert(nargs < MAXPROCARG); + assert(nargs <= MAXPROCARG); for (j = 0; j < nargs; j++) { getint(procarg[j],bp); } diff --git a/mach/proto/ncg/subr.c b/mach/proto/ncg/subr.c index e5f6cca0a..c25cb0ba5 100644 --- a/mach/proto/ncg/subr.c +++ b/mach/proto/ncg/subr.c @@ -324,6 +324,14 @@ distance(cindex) { return(100); if (expsize