Is this a If statement bug?

As already stated… Compare returns and int, which is 0 when both are equals, which then translates to false if used directly, which then gives you the opposite result than the expected one. In practice:


if (SomeMatinee->MatineeControllerName.Compare("FLWeather"))
{
    // NOT equal
}

if (SomeMatinee->MatineeControllerName.Compare("FLWeather") == 0)
{
    // equal
}