Skip to content

Commit

Permalink
fix %hhn and %hn in the internal xvsnprintf function
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdudz committed Dec 10, 2023
1 parent 6b855d5 commit 9985ee7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/xsprintf.c
Original file line number Diff line number Diff line change
Expand Up @@ -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, int*) = P->BufFill; break;
case lmShort: *va_arg (P->ap, int*) = P->BufFill; break;
case lmChar: *va_arg (P->ap, char*) = P->BufFill; break;
case lmShort: *va_arg (P->ap, 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;
Expand Down

0 comments on commit 9985ee7

Please sign in to comment.