Good morning, I'm reading values into an array which are then getting checked against for a specific system protocol, upon which if the conditions are not satisfied, the program must continue reading, simple enough. The code block:
buff = read(fp, token_monger, MAX_APDU);
printf("the token_monger[2] and token_monger[3] = %02x and %02x\n",token_monger[2], token_monger[3]);
while(token_monger[2] != 0x01 && token_monger[3] != 0x00)
{
printf("inside while token check\n");
buff = read(fp, token_monger, MAX_APDU);
token_monger[buff] = 0;
}
printf("the token_monger[2] and token_monger[3] = %02x and %02x\n",token_monger[2], token_monger[3]);
the prints before and after the while loop are there for debugging. they are both printing a value of 0x00. When I execute this code, the process reaches before and after the loop but never enters it, I know from my prints that the conditions are not satisfied, furthermore, there is an if statement just a few lines down that should also be satisfied when the program exits the while loop (if anyone would like to see that portion, I can post). I was wondering if there is anything glaringly obvious that I am doing wrong, or if this is a possible issue with the compiler and not being able to handle something like this (which seems highly unlikely) thanks again
Aucun commentaire:
Enregistrer un commentaire