Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/bin/sh Another fix from FreeBSD. I'm not sure how to trigg...



details:   https://anonhg.NetBSD.org/src/rev/7dbd6a7fbfaa
branches:  trunk
changeset: 823693:7dbd6a7fbfaa
user:      kre <kre%NetBSD.org@localhost>
date:      Wed May 03 06:20:12 2017 +0000

description:
Another fix from FreeBSD.   I'm not sure how to trigger the problem
fixed (there might be no way) - but it "feels right"!

When popping an (exhausted) input string off the input stack, allow
for the possibility that the previous string might also just happened
to have run out of steam as well, so keep poppin' along until we
run out of pop, or find something to consume.

diffstat:

 bin/sh/input.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 9a203cfe9d56 -r 7dbd6a7fbfaa bin/sh/input.c
--- a/bin/sh/input.c    Wed May 03 05:49:54 2017 +0000
+++ b/bin/sh/input.c    Wed May 03 06:20:12 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: input.c,v 1.55 2017/05/03 04:51:04 kre Exp $   */
+/*     $NetBSD: input.c,v 1.56 2017/05/03 06:20:12 kre Exp $   */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)input.c    8.3 (Berkeley) 6/9/95";
 #else
-__RCSID("$NetBSD: input.c,v 1.55 2017/05/03 04:51:04 kre Exp $");
+__RCSID("$NetBSD: input.c,v 1.56 2017/05/03 06:20:12 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -244,7 +244,7 @@
 #endif
        char savec;
 
-       if (parsefile->strpush) {
+       while (parsefile->strpush) {
                popstring();
                if (--parsenleft >= 0)
                        return (*parsenextc++);



Home | Main Index | Thread Index | Old Index