From 2cbf6b6a19716cd4f03c820929710499576aa809 Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 31 Jan 2018 09:14:40 +0000 Subject: 42332: Special case unsigned printf formats. For constants we can avoid a conversion to signed by examining the expression before passing to math eval. --- Src/builtin.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Src/builtin.c') diff --git a/Src/builtin.c b/Src/builtin.c index 0211f2721..fb59738f3 100644 --- a/Src/builtin.c +++ b/Src/builtin.c @@ -5243,7 +5243,10 @@ bin_print(char *name, char **args, Options ops, int func) *d++ = 'l'; #endif *d++ = 'l', *d++ = *c, *d = '\0'; - zulongval = (curarg) ? mathevali(curarg) : 0; + if (!curarg) + zulongval = (zulong)0; + else if (!zstrtoul_underscore(curarg, &zulongval)) + zulongval = mathevali(curarg); if (errflag) { zulongval = 0; errflag &= ~ERRFLAG_ERROR; -- cgit 1.4.1