[sword-devel] Institutes has an infinite loop with TreeKeyIdx::nextSibling()
Ben Morgan
benpmorgan at gmail.com
Mon Mar 24 02:32:47 MST 2008
Hi,
I can confirm that I'm seeing this from python, when I translate your
snippet.
As a temporary fix, you can clone the key to get the saved key. Change this
bit
std::string savedKey;
// savedKey = key->getFullName(); //sword 1.5.8
savedKey = key->getText();
into something like
Sword::TreeKeyIdx savedKey = key.Clone();
and then use the saved key later down. This is (I think) a much nicer way to
do it.
The problem occurs when you try to set the key back to the original text.
The string that causes the problem is
/INSTITUTES OF THE CHRISTIAN RELIGION /BOOK FIRST. - OF THE KNOWLEDGE OF GOD
THE CREATOR
The crucial part is the space just before the second slash.
The reason why this doesn't work is due to the following line in setText()
in TreeKeyIdx.cpp:463
leaf.trim();
which will trim the space off. Now it compares against the one with the
space, and it doesn't match.
God Bless,
Ben
-------------------------------------------------------------------------------------------
The Lord is not slow to fulfill his promise as some count slowness,
but is patient toward you, not wishing that any should perish,
but that all should reach repentance.
2 Peter 3:9 (ESV)
On Mon, Mar 24, 2008 at 6:23 PM, Eeli Kaikkonen <
eekaikko at mail.student.oulu.fi> wrote:
> I reported a bug in Calvin's Institutes module in
> http://www.crosswire.org/bugs/browse/MOD-62. Can others confirm this?
>
>
> Yours,
> Eeli Kaikkonen (Mr.), Oulu, Finland
> e-mail: eekaikko at mailx.studentx.oulux.fix (with no x)
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.crosswire.org/pipermail/sword-devel/attachments/20080324/0c483bbe/attachment.html
More information about the sword-devel
mailing list