Objective-C if-statement entered on a wrong basis
===

I'm an experienced programmer so this cryptic behaviour is a total mystery to me.

I have a simple `if`-statement that *should* only be entered when exactly two boolean variables are `false`. However, the `if`-statement is for some reason entered when only one of them is `false`.

My code looks like this:

    BOOL connected = [self connected];
    
    NSLog(@"Connected to the internet: %@", connected ? @"YES" : @"NO");
    
    BOOL notConnectedMessageShown = ((FOLDAppDelegate *)[[UIApplication sharedApplication] delegate]).notConnectedMessageShown;
    
    NSLog(@"notConnectedMessageShown: %@", notConnectedMessageShown ? @"YES" : @"NO");
    
    if (!connected && !notConnectedMessageShown);
    {
        NSLog(@"Entering if statement");
    }

And the `NSLog`prints the following:

    "Connected to the internet: YES"
    "notConnectedMessageShown: NO"
    "Entering if statement"

I really do not understand. Since the first variable is `true`in the first place, the entire `if`-statement should be skipped according to my programming skills?

Does anyone have an idea of what is going on here?