[sword-svn] r2137 - trunk/utilities

dmsmith at www.crosswire.org dmsmith at www.crosswire.org
Thu Feb 28 03:28:02 MST 2008


Author: dmsmith
Date: 2008-02-28 03:28:02 -0700 (Thu, 28 Feb 2008)
New Revision: 2137

Modified:
   trunk/utilities/osis2mod.cpp
Log:
fixed a seg fault in osis2mod

Modified: trunk/utilities/osis2mod.cpp
===================================================================
--- trunk/utilities/osis2mod.cpp	2008-02-24 09:57:46 UTC (rev 2136)
+++ trunk/utilities/osis2mod.cpp	2008-02-28 10:28:02 UTC (rev 2137)
@@ -303,7 +303,7 @@
 		if (token->getAttribute("osisID")) {
 
 			// BOOK START
-			if ((!strcmp(tokenName, "div")) && (!strcmp(typeAttr, "book"))) {
+			if ((!strcmp(tokenName, "div")) && (typeAttr && !strcmp(typeAttr, "book"))) {
 				inVerse = false;
 				if (inBookHeader || inChapterHeader) {	// this one should never happen, but just in case
 #ifdef DEBUG
@@ -333,7 +333,7 @@
 			}
 
 			// CHAPTER START
-			else if (((!strcmp(tokenName, "div")) && (!strcmp(typeAttr, "chapter")))
+			else if (((!strcmp(tokenName, "div")) && (typeAttr && !strcmp(typeAttr, "chapter")))
 					 || (!strcmp(tokenName, "chapter"))
 					 ) {
 				inVerse = false;




More information about the sword-cvs mailing list