I see in your last code in src/spellcheck.cpp
next lines
364: for (unsigned int i = 0; i < size; ++i) ++dictWordLetterSet[letterIndexData[(unsigned char)dictinfo[i]]]; // computer number of each kind of letter
632: for (unsigned int i = 0; i < len; ++i) ++realWordLetterCounts[(unsigned char)letterIndexData[word[i]]]; // compute number of each kind of character
look at work with letterIndexData,
as you can see in line 364 (unsigned char) cast
you must add such casting and in line 632 for word
because… of cause you must understand why
PS: in my case i use gdb in your old customized version chatscript(~2.7) and got
Program received signal SIGSEGV, Segmentation fault.
0x080bf4c7 in SpellFix (originalWord=0xb563c0ec “\360\237\230\214”, position=1, posflags=210445008896) at src/spellcheck.cpp:583
583 for (unsigned int i = 0; i < len; ++i) ++set[(unsigned char)letterIndexData[word]];// for length of dictionary word, not user input
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.107.el6.i686 libgcc-4.4.7-3.el6.i686 libstdc++-4.4.7-3.el6.i686