[sword-devel] BibleTime indexing problem

Matthew Talbert ransom1982 at gmail.com
Mon Feb 27 21:24:05 MST 2012


On Mon, Feb 27, 2012 at 11:05 PM, Gary Holmlund <gary.holmlund at gmail.com> wrote:
>
>
> I am investigating why the searching in BibleTime for the HunKar Bible
> begins

> Tracing down through sword "book" is set to 39 in
> sword:VerseKey::Normalize.
> Here is the call stack from setPosition down to Normalize:

> book is set to 39 by the following code in sword:VerseKey::Normalize
>
>       if (book < 1) {
>        if (--testament > 0) {
>         book += BMAX[testament-1]; // versekey.cpp line 1274 ::Normalize
>        }
>        continue;
>       }


I don't think you should be using Normalize here. Normalize should be
used for user input, which could be incorrect, so it will turn out of
range verses (for example) into real verses. So if Normalize is doing
something in this case, I think it means the rest of your code is
wrong.

Matthew



More information about the sword-devel mailing list