From 4ce272bc94d4199b51a211164b30da823633c30c Mon Sep 17 00:00:00 2001 From: dooglus Date: Sun, 8 Apr 2007 04:05:59 +0000 Subject: [PATCH] Fix 1696279: Check for and skip whitespace before checking for priorities. git-svn-id: http://svn.voria.com/code@445 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/loadcanvas.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/synfig-core/trunk/src/synfig/loadcanvas.cpp b/synfig-core/trunk/src/synfig/loadcanvas.cpp index bbb6d77..6bbefc0 100644 --- a/synfig-core/trunk/src/synfig/loadcanvas.cpp +++ b/synfig-core/trunk/src/synfig/loadcanvas.cpp @@ -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') -- 2.7.4