Sophie

Sophie

distrib > Mageia > 6 > armv5tl > by-pkgid > e889b68048f87f4c653d7bfbf17b076d > files > 1

c2070-0.99-15.mga6.src.rpm

--- c2070-0.99/c2070.c.mrl	2004-05-31 10:15:22.755686400 -0300
+++ c2070-0.99/c2070.c	2004-05-31 10:16:28.934625672 -0300
@@ -117,7 +117,7 @@
   register int redleft = 0; 
   register int redright = 0; 
   int bstart = 0;
-  while ((buffer[redleft] == 0) && (redleft < *bytesize)) redleft++;
+  while ((redleft < *bytesize) && (buffer[redleft] == 0)) redleft++;
   while ((buffer[*bytesize - 1 - redright] == 0) && 
 	 (redright < *bytesize)) redright++;
   *breite -= redleft / bytespercolumn + redright / bytespercolumn;
@@ -156,7 +156,7 @@
       
   if (width > 0) { /* do not print empty sweeps */
     for(i=0; i<BYTES_PER_HEADER; i++) putc(header[i], out);
-    for(i=0; i<(bytesize);i++) putc(buffer[i+bstart], out);
+    for(i=0; i<(width);i++) putc(buffer[i+bstart], out);
   }
 } /* PrintSweep */	
 
@@ -284,7 +284,7 @@
 
 	  /* This extracts the nibbles and transforms them to the bits
 	     in the output stream. */
-	  for(i=0; (i <= width); i++)
+	  for(i=0; (i < width); i++)
 	    {                              
 	      nibble = (line[i/2] << (4 * (i % 2))) & 0xF0;
 	      if (nibble & BLACK) {