3 minor 'vi' bugs.

W Stevens stevens at inuxh.UUCP
Tue Jul 10 03:41:33 AEST 1984


>    >   The first bug is in the CTRL(b) case of vmain(), line ~= 425 in
>    >ex_vmain.c. There are some parentheses missing in the address ...
>    >
>    >	/* original code */
>    >	addr = dot - vcline - 2 + (cnt-1)*basWLINES;
>    >	/* modified code */
>    >	addr = dot - ((vcline - 2) + (cnt-1)*basWLINES);

>    I'll have to take exception to this; the correctly modified line
>    should be:
>    
>    	addr = dot - vcline - 2 - (cnt-1)*basWLINES;

Wrongo; the first fix is correct.  In fact, there's another bug in the
following line, too.  The complete fix is:

		if (one + vcline != dot && vcnt > 2) {
	*		addr = dot - vcline + 2 - (cnt-1)*basWLINES;
	*		forbid (addr <= one);
			dot = addr;
			vcnt = vcline = 0;
		}

--
Scott Stevens
AT&T Consumer Products
Indianapolis, Indiana, USA
UUCP: inuxh!stevens



More information about the Net.bugs mailing list