mercredi 30 novembre 2016

Why is this "if" condition skipped?

I have an if condition (see below) which should be executing. I tried stepping through the the function step by step to see if I was getting wrong values but it seems it is correct (please, see the debugger image attached below). I am assuming that I simply made a syntax mistake in the condition but I am really unsure what the issue is.

if ((write_ind == 16)||((payload_ind == data_len[i])&&(i == last_wr)))
        {
            nt3h_eeprom_write_page(eeprom_address, write_buff);
            memset(write_buff, 0x00, sizeof(write_buff));
            if (write_ind == 16)
            {
                eeprom_address = nt3h_eeprom_increment_addr(eeprom_address);
                write_ind = 0;
            }
        }

enter image description here

As you can see, the right OR side should be true, but it is not the case. Thank you for the help.

Aucun commentaire:

Enregistrer un commentaire