Hopefully fixed crash when adding custom color in kpalette

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1164953 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 15 years ago
parent 2de1f0b1e3
commit e88c191dcb

@ -65,10 +65,10 @@ KPalette::KPalette(const TQString &name)
// Read first line // Read first line
// Expected "GIMP Palette" // Expected "GIMP Palette"
if (paletteFile.readLine(const_cast<char *>(line.ascii()), maxLength) == -1) return; if (paletteFile.readLine(line, maxLength) == -1) return;
if (line.find(" Palette") == -1) return; if (line.find(" Palette") == -1) return;
while( paletteFile.readLine(const_cast<char *>(line.ascii()), maxLength) != -1) while( paletteFile.readLine(line, maxLength) != -1)
{ {
if (line[0] == '#') if (line[0] == '#')
{ {

Loading…
Cancel
Save