Fix KSVGIconPainter deadlock with specifically formatted input files

This resolves Bug 1418
(cherry picked from commit 3fefe5e7d3)
v3.5.13-sru
Timothy Pearson 12 years ago committed by Slávek Banko
parent ed0d72dedc
commit 3ab7d7ba97

@ -2208,16 +2208,22 @@ void KSVGIconPainter::drawPath(const TQString &data, bool filled)
break; break;
} }
if(*ptr == '+' || *ptr == '-' || (*ptr >= '0' && *ptr <= '9')) if(*ptr == '+' || *ptr == '-' || *ptr == '.' || (*ptr >= '0' && *ptr <= '9'))
{ {
// there are still coords in this command // there are still coords in this command
if(command == 'M') if(command == 'M')
{
command = 'L'; command = 'L';
}
else if(command == 'm') else if(command == 'm')
{
command = 'l'; command = 'l';
}
} }
else else
{
command = *(ptr++); command = *(ptr++);
}
// Detect reflection points // Detect reflection points
if(lastCommand != 'C' && lastCommand != 'c' && if(lastCommand != 'C' && lastCommand != 'c' &&

Loading…
Cancel
Save