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

chrislit at crosswire.org chrislit at crosswire.org
Mon Mar 17 02:32:55 MST 2014


Author: chrislit
Date: 2014-03-17 02:32:55 -0700 (Mon, 17 Mar 2014)
New Revision: 3135

Modified:
   trunk/src/modules/common/rawverse4.cpp
Log:
since we tried to read 4 bytes, we should enter the error case if we read fewer than 4 bytes (not 2)


Modified: trunk/src/modules/common/rawverse4.cpp
===================================================================
--- trunk/src/modules/common/rawverse4.cpp	2014-03-17 09:30:15 UTC (rev 3134)
+++ trunk/src/modules/common/rawverse4.cpp	2014-03-17 09:32:55 UTC (rev 3135)
@@ -131,7 +131,7 @@
 		*start = swordtoarch32(tmpStart);
 		*size  = swordtoarch32(tmpSize);
 
-		if (len < 2) {
+		if (len < 4) {
 			*size = (unsigned long)((*start) ? (textfp[testmt-1]->seek(0, SEEK_END) - (long)*start) : 0);	// if for some reason we get an error reading size, make size to end of file
 		}
 	}




More information about the sword-cvs mailing list