1 // introduced by d6c855caa88ddb1ab6e24e23a14b1e7baf4ba9c7 2018-09-15
2 // sscanf may crash on short input
9 const char *fmt
= "%f%c";
12 int r
= sscanf(s
, fmt
, &f
, &c
);
14 t_error("sscanf(\"%s\", \"%s\",..) returned %d, wanted 1\n", s
, fmt
, r
);
15 if (f
!= 0.0f
|| c
!= 'x')
16 t_error("sscanf(\"%s\", \"%s\",..) assigned f=%f c='%c', wanted i=0 c='x'\n", s
, fmt
, f
, c
);