From 3fefe5e7d33c6c28d8109f5791c1e0a4a432a07f Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 7 Apr 2013 02:10:54 -0500 Subject: Fix KSVGIconPainter deadlock with specifically formatted input files This resolves Bug 1418 --- tdecore/svgicons/ksvgiconpainter.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tdecore/svgicons/ksvgiconpainter.cpp b/tdecore/svgicons/ksvgiconpainter.cpp index 72fc96d7c..ca781db15 100644 --- a/tdecore/svgicons/ksvgiconpainter.cpp +++ b/tdecore/svgicons/ksvgiconpainter.cpp @@ -2208,16 +2208,22 @@ void KSVGIconPainter::drawPath(const TQString &data, bool filled) break; } - if(*ptr == '+' || *ptr == '-' || (*ptr >= '0' && *ptr <= '9')) + if(*ptr == '+' || *ptr == '-' || *ptr == '.' || (*ptr >= '0' && *ptr <= '9')) { // there are still coords in this command if(command == 'M') + { command = 'L'; + } else if(command == 'm') + { command = 'l'; + } } else + { command = *(ptr++); + } // Detect reflection points if(lastCommand != 'C' && lastCommand != 'c' && -- cgit v1.2.1