[QScintilla] Bug in Scintilla: what to do ?
Xavier Noëlle
gray2style at gmail.com
Tue Dec 11 09:58:30 GMT 2007
Hi,
I was trying to use WordList and didn't understand why the hell my
test 'wordList.InList ("toto")' was giving me random results.
I searched into the Scintilla code and discovered this piece of code
(PropSet.cpp, in the InList method):
const char *a = words[j] + 1;
const char *b = s;
while (*a && *a == *b) {
a++;
b++;
}
if (*a)
{
return true;
}
which obviously goes wrong if a is shorter than b or even empty...
This gives me two questions:
- why does not Scintilla use standard things for strings (strcmp or
even strncmp would have been more reliable in this place) ? (but
that's more of a rhetorical question)
- what should I do in this case, concerning the "bundle" Scintilla +
QScintilla ? How are they linked together and what is the good way to
correct this ?
Cheers,
--
Xavier NOELLE
More information about the QScintilla
mailing list