COMMON: U32: Fix incorrect usage of %i

- %i & %d work in the same manner.
This commit is contained in:
aryanrawlani28 2020-08-31 00:19:53 +05:30 committed by Thierry Crozat
parent 2fdb7bb894
commit fe561ecdee

View file

@ -641,6 +641,8 @@ int U32String::vformat(U32String::const_iterator fmt, const U32String::const_ite
output.insertString(string_temp, pos);
pos += len - 1;
break;
case 'i':
// fallthrough intended
case 'd':
int_temp = va_arg(args, int);
itoa(int_temp, buffer, 10);
@ -656,15 +658,6 @@ int U32String::vformat(U32String::const_iterator fmt, const U32String::const_ite
len = strlen(buffer);
length += len;
output.insertString(buffer, pos);
pos += len - 1;
break;
case 'i':
int_temp = va_arg(args, uint16);
itoa(int_temp, buffer, 10);
len = strlen(buffer);
length += len;
output.insertString(buffer, pos);
pos += len - 1;
break;