Subject: bug#54388: printf doesn't handle multi-byte values

From: Pádraig Brady <[email-masked]>
Date: Fri, 18 Mar 2022 15:41:11 +0000

On 18/03/2022 14:59, Pádraig Brady wrote:
> The attached should fix this up.

The following should make this more efficient for the normal unibyte case,
as one can't have NUL chars in any multi-byte encodings.

-      if (MB_CUR_MAX > 1)                                               \
+      if (MB_CUR_MAX > 1 && *(s + 1))                                   \