[sword-svn] r3310 - trunk/utilities

dmsmith at crosswire.org dmsmith at crosswire.org
Wed Dec 17 07:02:43 MST 2014


Author: dmsmith
Date: 2014-12-17 07:02:43 -0700 (Wed, 17 Dec 2014)
New Revision: 3310

Modified:
   trunk/utilities/osis2mod.cpp
Log:
osis2mod infinite loop fix fixed.

Modified: trunk/utilities/osis2mod.cpp
===================================================================
--- trunk/utilities/osis2mod.cpp	2014-12-15 20:13:35 UTC (rev 3309)
+++ trunk/utilities/osis2mod.cpp	2014-12-17 14:02:43 UTC (rev 3310)
@@ -826,18 +826,20 @@
 				// This should never happen if the references are valid OSIS references
 				ListKey verseKeys = currentVerse.parseVerseList(keyVal, currentVerse, true);
 				int memberKeyCount = verseKeys.getCount();
-				if (memberKeyCount > 1) {
+				if (memberKeyCount) {
 					currentVerse = verseKeys.getElement(0);
 					// See if this osisID or annotateRef refers to more than one verse.
 					// If it does, save it until all verses have been seen.
 					// At that point we will output links.
 					// This can be done by incrementing, which will produce an error
 					// if there is only one verse.
-					verseKeys.setPosition(TOP);
-					verseKeys.increment(1);
-					if (!verseKeys.popError()) {
-					cout << "DEBUG(LINK): " << currentVerse.getOSISRef() << endl;
-						linkedVerses.push_back(verseKeys);
+					if (memberKeyCount > 1) {
+						verseKeys.setPosition(TOP);
+						verseKeys.increment(1);
+						if (!verseKeys.popError()) {
+							cout << "DEBUG(LINK): " << currentVerse.getOSISRef() << endl;
+							linkedVerses.push_back(verseKeys);
+						}
 					}
 				}
 				else {




More information about the sword-cvs mailing list