Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/sh PR/43597: Don't break from parsing word tokens in we ...
details: https://anonhg.NetBSD.org/src/rev/d9de58bab312
branches: trunk
changeset: 778427:d9de58bab312
user: christos <christos%NetBSD.org@localhost>
date: Sun Mar 25 18:49:13 2012 +0000
description:
PR/43597: Don't break from parsing word tokens in we are in double quotes.
Fixes: sh -c 'echo "${foo:="first-word"} second-word"'
diffstat:
bin/sh/parser.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r e3f91cdd9ca9 -r d9de58bab312 bin/sh/parser.c
--- a/bin/sh/parser.c Sun Mar 25 17:30:59 2012 +0000
+++ b/bin/sh/parser.c Sun Mar 25 18:49:13 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parser.c,v 1.80 2011/08/31 16:24:55 plunky Exp $ */
+/* $NetBSD: parser.c,v 1.81 2012/03/25 18:49:13 christos Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)parser.c 8.7 (Berkeley) 5/16/95";
#else
-__RCSID("$NetBSD: parser.c,v 1.80 2011/08/31 16:24:55 plunky Exp $");
+__RCSID("$NetBSD: parser.c,v 1.81 2012/03/25 18:49:13 christos Exp $");
#endif
#endif /* not lint */
@@ -1108,7 +1108,7 @@
case CEOF:
goto endword; /* exit outer loop */
default:
- if (varnest == 0)
+ if (varnest == 0 && !ISDBLQUOTE())
goto endword; /* exit outer loop */
USTPUTC(c, out);
}
Home |
Main Index |
Thread Index |
Old Index