Fix: support %#llx/%#llX format for 32-bit targets

This commit is contained in:
deadwood 2022-05-26 09:36:46 +02:00
parent 9905978baf
commit f19f0ace25
1 changed files with 10 additions and 2 deletions

View File

@ -181,9 +181,17 @@
if (flags & ALTERNATEFLAG)
{
if (type == 'o' && preci && v)
char nzero;
#ifdef AROS_HAVE_LONG_LONG
if (lltype)
nzero = (llv != 0);
else
#endif
nzero = (v != 0);
if (type == 'o' && preci && nzero)
buffer1[size1++] = '0';
if ((type == 'x' || type == 'X') && v)
if ((type == 'x' || type == 'X') && nzero)
{
buffer1[size1++] = '0';
buffer1[size1++] = type;