[sword-svn] r3903 - trunk/utilities
dmsmith at crosswire.org
dmsmith at crosswire.org
Thu Jun 19 13:40:40 EDT 2025
Author: dmsmith
Date: 2025-06-19 13:40:40 -0400 (Thu, 19 Jun 2025)
New Revision: 3903
Modified:
trunk/utilities/osis2mod.cpp
Log:
MODTOOLS-108 fix. Properly append verses beyond the last chapter of a book at the end of the book in the last verse of the chapter.
Modified: trunk/utilities/osis2mod.cpp
===================================================================
--- trunk/utilities/osis2mod.cpp 2025-06-19 16:56:23 UTC (rev 3902)
+++ trunk/utilities/osis2mod.cpp 2025-06-19 17:40:40 UTC (rev 3903)
@@ -440,7 +440,8 @@
// Since isValidRef returned false constrain the key to the nearest prior reference.
// If we are past the last chapter set the reference to the last chapter
int chapterMax = key.getChapterMax();
- if (key.getChapter() > chapterMax) {
+ bool beyondChapter = key.getChapter() > chapterMax;
+ if (beyondChapter) {
key.setChapter(chapterMax);
}
@@ -471,7 +472,7 @@
// In this case we should re-versify Matt.7.30 as Matt.7.29.
// However, since this and 2) are ambiguous, we'll re-reversify to the last entry in the module.
- while (!key.popError() && !module->hasEntry(&key)) {
+ while (!beyondChapter && !key.popError() && !module->hasEntry(&key)) {
key.decrement(1);
}
More information about the sword-cvs
mailing list