To check it, you can test lastVerseIDs.Count() > 0 Also, I prefer using an explicit GetElement as is currently used, rather than c++ operator overloading magic - especially in assignment.
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 Thu, Sep 4, 2008 at 11:59 AM, DM Smith <[EMAIL PROTECTED]> wrote: > osis2mod does not validate that the document is valid OSIS. Rome is not a > valid osisID. > On another note. I am fixing bugs in osis2mod right now and if you can > explain how to ensure the validity of the verse list, I'd appreciate that. > > The code below didn't work anyway. > > I'm changing that code to something like: > lastVerseIDs = TOP; > *currentVerse = lastVerseIDs; > > In Him, > DM > > On Sep 3, 2008, at 7:30 PM, Ben Morgan wrote: > > Change Rome throughout the document to Rom and it will work. > > osis2mod doesn't seem to ensure the validity of verselists it gets, and so > crashes on the last line below (where it tries to get the first element of > an empty list key): > lastVerseIDs = currentVerse->ParseVerseList(keyVal, > *currentVerse, true); > > // set currentVerse to the first value in the keyVal > VerseKey *element = SWDYNAMIC_CAST(VerseKey, > lastVerseIDs.GetElement(0)); > > > 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 Thu, Sep 4, 2008 at 2:09 AM, Sebastien Koechlin <[EMAIL PROTECTED] > > wrote: > >> Hi >> >> On Sat, Aug 02, 2008 at 04:33:41PM -0700, Mico Siahaan wrote: I am new in >> > making SWORD modules. I tried to use osis2mod to convert a OSISBible >> > format text to SWORD modules, but I got error message: osis2mod.exe has >> > encountered a problem and needs to close. We are sorry for the >> > inconvenience. >> >> I do not have any problem with your file, using sword 1.5.9 and sword >> 1.5.10 >> on Linux, and your file looks well-formed and valid XML. >> >> BUT, with sword 1.5.11, I also have a segfault on your file. >> >> Starting program: /usr/local/bin/osis2mod1511 /tmp/ indTB.xml -z >> warning: Lowest section in /usr/lib/libicudata.so.36 is .hash at >> 000000b4 >> [Thread debugging using libthread_db enabled] >> [New Thread 16384 (LWP 22144)] >> You are running osis2mod: $Rev: 2169 $ >> >> Program received signal SIGSEGV, Segmentation fault. >> [Switching to Thread 16384 (LWP 22144)] >> 0x0804e5e6 in handleToken () >> (gdb) bt >> #0 0x0804e5e6 in handleToken () >> #1 0x0804f747 in main () >> (gdb) >> >> I do not have any segfault with other OSIS files. >> >> -- >> Sébastien Koechlin >> >> _______________________________________________ >> sword-devel mailing list: [email protected] >> http://www.crosswire.org/mailman/listinfo/sword-devel >> Instructions to unsubscribe/change your settings at above page >> > > _______________________________________________ > sword-devel mailing list: [email protected] > http://www.crosswire.org/mailman/listinfo/sword-devel > Instructions to unsubscribe/change your settings at above page > > > > _______________________________________________ > sword-devel mailing list: [email protected] > http://www.crosswire.org/mailman/listinfo/sword-devel > Instructions to unsubscribe/change your settings at above page >
_______________________________________________ sword-devel mailing list: [email protected] http://www.crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page
