Fix 1696279: Check for and skip whitespace before checking for priorities.
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 8 Apr 2007 04:05:59 +0000 (04:05 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Sun, 8 Apr 2007 04:05:59 +0000 (04:05 +0000)
git-svn-id: http://svn.voria.com/code@445 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/loadcanvas.cpp

index bbb6d77..6bbefc0 100644 (file)
@@ -1601,6 +1601,10 @@ CanvasParser::parse_dynamic_list(xmlpp::Element *element,Canvas::Handle canvas)
                                        String timecode(begin_sequence.begin(), iter);
                                        int priority=0;
 
+                                       // skip whitespace before checking for a priority
+                                       while (isspace(timecode[0]))
+                                               timecode=timecode.substr(1);
+
                                        // If there is a priority, then grab it and remove
                                        // it from the timecode
                                        if(timecode[0]=='p')
@@ -1637,6 +1641,10 @@ CanvasParser::parse_dynamic_list(xmlpp::Element *element,Canvas::Handle canvas)
                                        String timecode(end_sequence.begin(),   iter);
                                        int priority=0;
 
+                                       // skip whitespace before checking for a priority
+                                       while (isspace(timecode[0]))
+                                               timecode=timecode.substr(1);
+
                                        // If there is a priority, then grab it and remove
                                        // it from the timecode
                                        if(timecode[0]=='p')