Support signed size_t sized objects in custom printf

This commit is contained in:
baldurk
2017-08-28 18:32:40 +01:00
parent bbf1c60859
commit a6e2e9fea5
+1 -1
View File
@@ -137,6 +137,7 @@ void PrintInteger(bool typeUnsigned, uint64_t argu, int base, uint64_t numbits,
case HalfHalf: argi = (int64_t)*typepun.c; break;
case Half: argi = (int64_t)*typepun.s; break;
case LongLong: argi = (int64_t)*typepun.i64; break;
case SizeT: argi = (int64_t)*typepun.i64; break;
}
bool negative = false;
@@ -1068,7 +1069,6 @@ void formatargument(char type, void *rawarg, FormatterParams formatter, char *&o
case SizeT:
numbits = 8 * sizeof(size_t);
argu = (uint64_t) * (size_t *)rawarg;
typeUnsigned = true;
break;
}
uppercaseDigits = (type < 'a');