6
I have an excerpt from a function with the following code:
printf("caminho: %d\n", t);
printf("min: %d\n", min);
if( min >= t && t != -1);
{
printf("oi\n");
min = t;
printf("min: %d\n",min);
}
and as a result I have:
way: 2
min: 1
hi
min: 2
The line printing "hi" is executed, even with the condition must be false.
Can someone tell me how this can happen?
Post the most complete code, at least the piece where the variables are declared. Better yet, post a minimal, compileable example that reproduces the problem.
– Luiz Vieira