We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2af2019 commit 5b17f53Copy full SHA for 5b17f53
examples/stdlib.c
@@ -4400,15 +4400,31 @@ static __attribute__((__noinline__)) bool scanf_get_num(
4400
if (!scanf_get_oct(in, &width, &i, &overflow))
4401
return false;
4402
}
4403
- else
+ else /* if (flags & SCANF_FLAG_HEX) */
4404
+ {
4405
scanf_unget_char_n(c, in, &width);
4406
+ if (!scanf_get_hex(in, &width, &i, &overflow))
4407
+ return false;
4408
+ }
4409
4410
else if (flags & SCANF_FLAG_DEC)
4411
{
4412
4413
if (!scanf_get_dec(in, &width, &i, &overflow))
4414
4415
4416
+ else if (flags & SCANF_FLAG_OCT)
4417
4418
+ scanf_unget_char_n(c, in, &width);
4419
+ if (!scanf_get_oct(in, &width, &i, &overflow))
4420
4421
4422
+ else if (flags & SCANF_FLAG_HEX)
4423
4424
4425
4426
4427
4428
else
4429
4430
0 commit comments