Add loadsvg script command, fix ParanoidNumber size limiting*
[ipdf/code.git] / src / path.cpp
index 589c509..f12e2a7 100644 (file)
@@ -14,13 +14,15 @@ Path::Path(const Objects & objects, unsigned start, unsigned end, const Colour &
        // Find the bounds coordinates
        //  and identify the top left and bottom right objects
        
-       unsigned left;
-       unsigned right;
-       unsigned top;
-       unsigned bottom;
+       unsigned left = m_start;
+       unsigned right = m_start;
+       unsigned top = m_start;
+       unsigned bottom = m_start;
        
        for (unsigned i = m_start; i <= m_end; ++i)
        {
+               if (i >= objects.bounds.size())
+                       break;
                const Rect & objb = objects.bounds[i];
                
                if (i == m_start || objb.x < xmin)

UCC git Repository :: git.ucc.asn.au