summaryrefslogtreecommitdiffhomepage
path: root/lib.c
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2022-03-15 21:22:16 +0100
committerJo-Philipp Wich <jo@mein.io>2022-03-15 23:15:12 +0100
commit55c4a902bf83d9a4ae12b4e8f19038a081238eb7 (patch)
tree084f9947fd1dc7aed81d77222e5eca990b1e862d /lib.c
parent0d05cb5eb07d19275370e3daa5da22dfc08786b1 (diff)
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 <jo@mein.io>
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c1
1 files changed, 1 insertions, 0 deletions
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;