[sword-svn] r2582 - trunk/src/modules/common

scribe at crosswire.org scribe at crosswire.org
Fri Oct 22 05:55:33 MST 2010


Author: scribe
Date: 2010-10-22 05:55:32 -0700 (Fri, 22 Oct 2010)
New Revision: 2582

Modified:
   trunk/src/modules/common/lzsscomprs.cpp
Log:
fixed LZSS compression


Modified: trunk/src/modules/common/lzsscomprs.cpp
===================================================================
--- trunk/src/modules/common/lzsscomprs.cpp	2010-10-21 14:32:56 UTC (rev 2581)
+++ trunk/src/modules/common/lzsscomprs.cpp	2010-10-22 12:55:32 UTC (rev 2582)
@@ -618,9 +618,9 @@
 				break;
 
 			if (SendChars((char *) c, 1) != 1) {
-				totalLen++;
 				break;
 			}
+			totalLen++;
 
 			// Add to buffer, and increment to next spot. Wrap at end.
 
@@ -673,9 +673,9 @@
 			// Add the "len" :characters to the output stream.
 
 			if (SendChars((char *) c, len) != (unsigned int)len) {
-				totalLen += len;
 				break;
 			}
+			totalLen += len;
 		}
 	}
 	slen = totalLen;




More information about the sword-cvs mailing list