From 55c4a902bf83d9a4ae12b4e8f19038a081238eb7 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Tue, 15 Mar 2022 21:22:16 +0100 Subject: lib: disallow zero padding for %s formats Filter the zero padding `0` flag for `%s` formats to achieve constisten outputs on Linux and OS X systems. Signed-off-by: Jo-Philipp Wich --- lib.c | 1 + 1 file changed, 1 insertion(+) (limited to 'lib.c') diff --git a/lib.c b/lib.c index ab004db..6290420 100644 --- a/lib.c +++ b/lib.c @@ -1322,6 +1322,7 @@ uc_printf_common(uc_vm_t *vm, size_t nargs, uc_stringbuf_t *buf) case 's': conv = FMT_C_STR; + flags &= ~FMT_F_ZERO; cfmt = "s"; break; -- cgit v1.2.3