This is pure speculation, but they may have changed it to foo==false. In C a boolean is just a byte which conventionally has the values 0 or 1, but an attacker which controls a boolean can give it the value of 2, and 2!=true and 2!=false. This has lead to real exploits:
https://windows-internals.com/exploiting-a-simple-vulnerabil...
When writing C or C++, never compare against true.