svn commit: r323964 - head/contrib/one-true-awk
Warner Losh
imp at FreeBSD.org
Sun Sep 24 05:04:03 UTC 2017
Author: imp
Date: Sun Sep 24 05:04:02 2017
New Revision: 323964
URL: https://svnweb.freebsd.org/changeset/base/323964
Log:
Fix %c for floating values that become 0 when coerced to int.
Obtained from: OpenBSD run.c 1.36 (From Jeremy Devenport)
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D12379
Modified:
head/contrib/one-true-awk/run.c
Modified: head/contrib/one-true-awk/run.c
==============================================================================
--- head/contrib/one-true-awk/run.c Sun Sep 24 05:03:57 2017 (r323963)
+++ head/contrib/one-true-awk/run.c Sun Sep 24 05:04:02 2017 (r323964)
@@ -918,7 +918,7 @@ int format(char **pbuf, int *pbufsize, const char *s,
break;
case 'c':
if (isnum(x)) {
- if (getfval(x))
+ if ((int)getfval(x))
sprintf(p, fmt, (int) getfval(x));
else {
*p++ = '\0'; /* explicit null byte */
More information about the svn-src-head
mailing list