File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ class PathIterator
4343 Py_XDECREF (m_codes);
4444 }
4545
46- static const char code_map[];
46+ static const unsigned code_map[];
4747
4848private:
4949 inline unsigned vertex (unsigned idx, double * x, double * y)
@@ -66,7 +66,8 @@ class PathIterator
6666 {
6767 if (m_iterator >= m_total_vertices) return agg::path_cmd_stop;
6868 unsigned code = vertex (m_iterator++, x, y);
69- while (MPL_isnan64 (*x) || MPL_isnan64 (*y)) {
69+ while ((MPL_isnan64 (*x) || MPL_isnan64 (*y)) &&
70+ m_iterator < m_total_vertices) {
7071 vertex (m_iterator++, x, y);
7172 code = agg::path_cmd_move_to;
7273 }
@@ -90,7 +91,7 @@ class PathIterator
9091};
9192
9293// Maps path codes on the Python side to agg path commands
93- const char PathIterator::code_map[] =
94+ const unsigned PathIterator::code_map[] =
9495 {0 ,
9596 agg::path_cmd_move_to,
9697 agg::path_cmd_line_to,
You can’t perform that action at this time.
0 commit comments