[bt-devel] crash while using mag window and LXX
Eeli Kaikkonen
eekaikko at mail.student.oulu.fi
Sat Jan 17 13:58:28 MST 2009
jdc wrote:
> Just a coincidence ....
> I deleted my LXX and re-added it. Now it works with both sets of code.
>
> Sorry for the trouble.
>
> jdc wrote:
>> The crash is from line 384 in src/frontend/cinfodisplay.cpp
>>
>> if (value.at(1).isDigit())
>>
>> value.at(1) is crashing on my computer. In this case value is "C",
>> which has a length of 1, and the index [1] is not returning
>> QChar::null. Instead of returning QChar::null it is crashing.
>>
>> The Qt documentation, starting at 4.0, states that the index must be a
>> valid position in the string. Apparently, they have finally updated the
>> code to make this statement serious.
>> My Qt version is 4.4.3 (all my Qt packages are listed below if you need
>> that information)
>>
>>
>> <snip> from src/frontend/cinfodisplay.cpp (line 377-389)
>>
>> // if we don't have a class assigned or desired one isn't
>> installed...
>> if (!module) {
>> // Morphs usually don't have [GH] prepended, but some old OLB
>> // codes do. We should check if we're digit after first char
>> // to better guess this.
>> // No need to check len, if at(1) is > len QChar::null is
>> // returned which is ok to .isDigit()
>> if (value.at(1).isDigit()) {
It doesn't hurt to make a check, just to be sure it works in any case,
so I added it to svn code:
if (value.size() > 1 && value.at(1).isDigit()) {
--Eeli Kaikkonen
More information about the bt-devel
mailing list