jeff@warwick.UUCP (Jeff Smith) (04/10/86)
The following fix to dcl2.c corrects an off-by-one error (consider the case when the signature function doesn't do anything - the length l2 will be -1. I suppose the length should be unsigned really). *** original/src/dcl2.c Mon Nov 25 15:53:31 1985 --- /usr/src/cmd/c++/src/dcl2.c Wed Apr 9 19:59:35 1986 *************** *** 100,105 char buf[128]; char* bb = n->tp->signature(buf); int l1 = strlen(s); int l2 = bb-buf-1; char* p = new char[l1+l2+1]; strcpy(p,s); --- 100,108 ----- char buf[128]; char* bb = n->tp->signature(buf); int l1 = strlen(s); + #ifdef STRLENFIXES + int l2 = bb - buf; + #else !STRLENFIXES int l2 = bb-buf-1; + #endif STRLENFIXES char* p = new char[l1+l2+1]; Jeff +44 203 523485 ..mcvax!warwick!jeff (uucp) jeff%warwick.uucp%daisy.warwick.ac.uk@ucl-cs.arpa (arpa)