mirror of
https://github.com/curl/curl.git
synced 2026-08-25 06:23:30 +03:00
mprintf: treat %o as unsigned, add tests for %o, %x, %X
`%x` and `%X` were already treated as unsigned, but `%o` was not, even though it was used with unsigned numbers. Closes #15348
This commit is contained in:
parent
7ca164faba
commit
0325e1b9b2
4 changed files with 50 additions and 4 deletions
|
|
@ -456,12 +456,12 @@ static int parsefmt(const char *format,
|
|||
break;
|
||||
case 'o':
|
||||
if(flags & FLAGS_LONGLONG)
|
||||
type = FORMAT_LONGLONG;
|
||||
type = FORMAT_LONGLONGU;
|
||||
else if(flags & FLAGS_LONG)
|
||||
type = FORMAT_LONG;
|
||||
type = FORMAT_LONGU;
|
||||
else
|
||||
type = FORMAT_INT;
|
||||
flags |= FLAGS_OCTAL;
|
||||
type = FORMAT_INTU;
|
||||
flags |= FLAGS_OCTAL|FLAGS_UNSIGNED;
|
||||
break;
|
||||
case 'x':
|
||||
if(flags & FLAGS_LONGLONG)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue