I think this is not strict VisualGDB problem, but I will explain it here, maybe someone know solution.
In my application I use atoi() function to convert string from MQTT message to integer. Argument string is always “0” or “1” but the result of conversion sometimes is 255 one or two times i see result = 243.
char result;
result = atoi(message.getValue());
printf("Result string = %s\r\n", message.getValue());
printf("Result value = %d\r\n", result);
Sometimes i see:
Result string = 1
Result value = 255
or
Result string = 0
Result value = 255
When I pritf all MQTT message I also see that value is correct, so I think that only reasone of my problems is atoi() malfunction, but I don’t know why.
I have similar problem with atof() but I think if I resolve atoi() problem. I will resolve also atof().
Regards, Marek