-
Bug
-
Resolution: Fixed
-
Medium
-
Code Generation Tools
-
CODEGEN-8485
-
-
-
default
When sscanf("%f") is faced with an input that looks like "EP", the conversion is supposed to fail and sscanf is supposed to return 0, consuming no characters. However, the TI sscanf implementation mistakenly consumes the E and returns 1, indicating a successful conversion. sscanf mistakenly accepts a variety of invalid float input items. This affects all members of the *scanf family.
#include <stdio.h> int main() { float f; int rv = sscanf("EP", "%f", &f); printf("rv == %d, expected 0\n", rv); }