PVS-Studio static analyzer was run against the S&Box game engine codebase (Facepunch's open-source C# 14 / .NET 10 project). The post walks through several real bugs found: a self-comparison typo in an if-condition, operator precedence confusion between ?? and &&, a potential NullReferenceException from a null-conditional
Sort: