<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Mar 21, 2013 at 6:26 PM, Troy A. Griffitts <span dir="ltr"><<a href="mailto:scribe@crosswire.org" target="_blank">scribe@crosswire.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>Thanks Karl, <br>
<br>
Yes, each snippet was helpful. Nic's was a quick test which caused the bug and was easy to use for testing. Greg's snippet wasn't as helpful as all his comments and stack traces leading up to his patch. He is preventing book from getting to 0 which does alleviate the problem but also stops a book from becoming an intro. Hope that explains.<br>
</div></div></blockquote><div><br></div><div style>If the conditional in my code is changed to </div><div style><br></div><div style>if (book > (intros?0:1) ) {</div><div style><br></div><div style>Then my code corrects the problem that -- was moving a VerseKey from Genesis 1:1 to [Testament 1 Intro] when intros is false. While not a SegFault producing bug, this is still a bug. Similar checks should be made through the same run of code to ensure moving to verse 0 and chapter 0 are not possible when intros is false. Both your fix and an adapted form of mine should be introduced. Additionally, the issue with OSISFootnotes should probably be fixed.</div>
<div style><br></div><div style>I will write up a simple test case for that, if it helps, once I get back to my development machine.</div><div style><br></div><div style>--Greg</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div><div>
<br>
Troy <br><br><div class="gmail_quote">Karl Kleinpaste <<a href="mailto:karl@kleinpaste.org" target="_blank">karl@kleinpaste.org</a>> wrote:<blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<pre style="white-space:pre-wrap;word-wrap:break-word;font-family:sans-serif;margin-top:0px"><div class="im">You didn't also need this snippet from Greg a couple days ago?<br><br>--- src/keys/versekey.cpp (revision 2792)<br>
+++ src/keys/versekey.cpp (working copy)<br>@@ -1347,7 +1347,9 @@<br> }<br> if (verse < (intros?0:1)) {<br> if (--chapter < (intros?0:1)) {<br>- --book;<br>+ if (book > 1) {<br>+ --book;<br>+ }<br>
chapter += (getChapterMax() + (intros?1:0));<br> }<br> verse += (getVerseMax() + (intros?1:0));<br><br><hr><br></div><div class="im">sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org" target="_blank">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>Instructions to unsubscribe/change your settings at above page<br></div></pre></blockquote>
</div><br><div class="im">
-- <br>
Sent from my Android phone with K-9 Mail. Please excuse my brevity.</div></div></div><br>_______________________________________________<br>
sword-devel mailing list: <a href="mailto:sword-devel@crosswire.org">sword-devel@crosswire.org</a><br>
<a href="http://www.crosswire.org/mailman/listinfo/sword-devel" target="_blank">http://www.crosswire.org/mailman/listinfo/sword-devel</a><br>
Instructions to unsubscribe/change your settings at above page<br></blockquote></div><br></div></div>