From b1c150249495d35b299c46579efc47a7b3cbc717 Mon Sep 17 00:00:00 2001 From: mrdudz Date: Mon, 11 Dec 2023 00:35:07 +0100 Subject: [PATCH] MS compiler insists on those typecasts apparently --- src/common/xsprintf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/xsprintf.c b/src/common/xsprintf.c index 2e811a5b1..aa3183752 100644 --- a/src/common/xsprintf.c +++ b/src/common/xsprintf.c @@ -352,8 +352,8 @@ static void StoreOffset (PrintfCtrl* P) /* Store the current output offset (%n format spec) */ { switch (P->LengthMod) { - case lmChar: *va_arg (P->ap, char*) = P->BufFill; break; - case lmShort: *va_arg (P->ap, short*) = P->BufFill; break; + case lmChar: *va_arg (P->ap, char*) = (char)P->BufFill; break; + case lmShort: *va_arg (P->ap, short*) = (short)P->BufFill; break; case lmInt: *va_arg (P->ap, int*) = P->BufFill; break; case lmLong: *va_arg (P->ap, long*) = P->BufFill; break; case lmIntMax: *va_arg (P->ap, intmax_t*) = P->BufFill; break;