Erroneous conditions
V3022 Expression ‘!LeftBoundIsForward’ is always false. clipper_library clipper.cs 838
V3022 Expression ‘!LeftBoundIsForward’ is always true. clipper_library clipper.cs 863
CWE-570/CWE-571 Expression is Always False/True
private TEdge ProcessBound(TEdge E, bool LeftBoundIsForward) { .... if (LeftBoundIsForward) { .... if (!LeftBoundIsForward) Result = Horz.Prev; .... } else { .... if (!LeftBoundIsForward) Result = Horz.Next; .... } .... }
This fragment of code contains two similar verifications at once. At the same time, in the first case the variable Result will never get the value Horz.Prev, and in the second case the same variable Result will always get the value Horz.Next. The author must carefully review the code and fix the bug himself.
Please click here to see more bugs from this project.