missing parens in calculation of "extra byte" (from Keith Muller)
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 16 Jul 1987 02:03:54 +0000 (18:03 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Thu, 16 Jul 1987 02:03:54 +0000 (18:03 -0800)
bug report 4.3BSD/usr.lib/55

SCCS-vsn: lib/libplot/t4014/subr.c 4.2

usr/src/lib/libplot/t4014/subr.c

index 929e069..7629fdc 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)subr.c     4.1 (Berkeley) %G%";
+static char sccsid[] = "@(#)subr.c     4.2 (Berkeley) %G%";
 #endif
 
 #include <stdio.h>
 #endif
 
 #include <stdio.h>
@@ -24,7 +24,7 @@ cont(x,y){
        hiy=(y>>7) & 037;
        lox = (x>>2)&037;
        loy=(y>>2)&037;
        hiy=(y>>7) & 037;
        lox = (x>>2)&037;
        loy=(y>>2)&037;
-       extra=x&03+(y<<2)&014;
+       extra=(x&03)+((y<<2)&014);
        n = (abs(hix-ohix) + abs(hiy-ohiy) + 6) / 12;
        if(hiy != ohiy){
                putch(hiy|040);
        n = (abs(hix-ohix) + abs(hiy-ohiy) + 6) / 12;
        if(hiy != ohiy){
                putch(hiy|040);