浏览代码

Fix potential uninitialized variable in clipper (#5881)

* Fix potential uninitialized variable in clipper

* Clipper: Fix second parameter as well.

---------

Co-authored-by: Kim Kulling <[email protected]>
Matt Iselin 9 月之前
父节点
当前提交
c867ddbc04
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      contrib/clipper/clipper.cpp

+ 1 - 1
contrib/clipper/clipper.cpp

@@ -1567,7 +1567,7 @@ bool Clipper::ExecuteInternal()
     m_SortedEdges = 0;
 
     succeeded = true;
-    cInt botY, topY;
+    cInt botY = 0, topY = 0;
     if (!PopScanbeam(botY)) return false;
     InsertLocalMinimaIntoAEL(botY);
     while (PopScanbeam(topY) || LocalMinimaPending())