diff --git a/CPP/Clipper2Lib/src/clipper.offset.cpp b/CPP/Clipper2Lib/src/clipper.offset.cpp index 4b4a2218..729497c2 100644 --- a/CPP/Clipper2Lib/src/clipper.offset.cpp +++ b/CPP/Clipper2Lib/src/clipper.offset.cpp @@ -524,9 +524,9 @@ void ClipperOffset::DoGroupOffset(Group& group) void ClipperOffset::ZCB(const Point64& bot1, const Point64& top1, const Point64& bot2, const Point64& top2, Point64& ip) { - if ((bot1.z != 0) && (bot1.z == bot2.z) || (bot1.z == top2.z)) ip.z = bot1.z; - else if ((bot2.z != 0) && (bot2.z == top1.z)) ip.z = bot2.z; - else if ((top1.z != 0) && (top1.z == top2.z)) ip.z = top1.z; + if (bot1.z && ((bot1.z == bot2.z) || (bot1.z == top2.z))) ip.z = bot1.z; + else if (bot2.z && (bot2.z == top1.z)) ip.z = bot2.z; + else if (top1.z && (top1.z == top2.z)) ip.z = top1.z; else if (zCallback64_) zCallback64_(bot1, top1, bot2, top2, ip); } #endif