[sword-svn] r3902 - trunk/src/keys

dmsmith at crosswire.org dmsmith at crosswire.org
Thu Jun 19 12:56:23 EDT 2025


Author: dmsmith
Date: 2025-06-19 12:56:23 -0400 (Thu, 19 Jun 2025)
New Revision: 3902

Modified:
   trunk/src/keys/versekey.cpp
Log:
MODTOOLS-108 fix. Allow chapters not in v11n when autonormalize is set to false.

Modified: trunk/src/keys/versekey.cpp
===================================================================
--- trunk/src/keys/versekey.cpp	2025-06-18 19:56:22 UTC (rev 3901)
+++ trunk/src/keys/versekey.cpp	2025-06-19 16:56:23 UTC (rev 3902)
@@ -1747,6 +1747,12 @@
 
 	long i = getIndex();
 
+	// assert we're sane
+	if (i < 0) {
+		error = KEYERR_OUTOFBOUNDS;
+		return;
+	}
+
 	initBounds();
 	if (i > upperBound) {
 		setIndex(upperBound);



More information about the sword-cvs mailing list