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 */ _______________________________________________ svn-src-all@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"