summaryrefslogtreecommitdiff
path: root/usr.bin/make/parse.c
diff options
context:
space:
mode:
authorrillig <rillig@NetBSD.org>2020-12-21 02:09:34 +0000
committerrillig <rillig@NetBSD.org>2020-12-21 02:09:34 +0000
commit147b7e14922befb150a54eb9e96b2c6674aad4de (patch)
tree7e487ed1d0658b5d0f1a34cfdca11d54fd99054c /usr.bin/make/parse.c
parentec91af9a4d76779fcce9b78ca8926022c81a5e44 (diff)
make(1): fix garbled output for failed shell command (since 2020-12-20)
Passing a struct as printf argument for the %s conversion doesn't work. On NetBSD-8.0-x86_64, the output looks normal, but on SunOS-5.9, the output is garbled, containing bytes 0xFF and 0xFE. This bug had been introduced in parse.c 1.507 from 2020-12-20 14:52:16. Thanks to sjg for finding this bug so quickly.
Diffstat (limited to 'usr.bin/make/parse.c')
-rw-r--r--usr.bin/make/parse.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index cc4ba763edb..f6dbb511323 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.508 2020/12/20 18:23:24 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.509 2020/12/21 02:09:34 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -117,7 +117,7 @@
#include "pathnames.h"
/* "@(#)parse.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.508 2020/12/20 18:23:24 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.509 2020/12/21 02:09:34 rillig Exp $");
/* types and constants */
@@ -1980,7 +1980,7 @@ VarAssign_EvalShell(const char *name, const char *uvalue, GNode *ctxt,
*out_avalue = FStr_InitOwn(cmdOut);
if (errfmt != NULL)
- Parse_Error(PARSE_WARNING, errfmt, cmd);
+ Parse_Error(PARSE_WARNING, errfmt, cmd.str);
FStr_Done(&cmd);
}