Source-Changes-HG archive

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

[src/trunk]: src/bin/sh Fix off by one in the display of var trees.



details:   https://anonhg.NetBSD.org/src/rev/f8b027a68b93
branches:  trunk
changeset: 522138:f8b027a68b93
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Feb 11 18:54:30 2002 +0000

description:
Fix off by one in the display of var trees.

diffstat:

 bin/sh/show.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (29 lines):

diff -r 967334c3d664 -r f8b027a68b93 bin/sh/show.c
--- a/bin/sh/show.c     Mon Feb 11 18:51:55 2002 +0000
+++ b/bin/sh/show.c     Mon Feb 11 18:54:30 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: show.c,v 1.18 1999/10/08 21:10:44 pk Exp $     */
+/*     $NetBSD: show.c,v 1.19 2002/02/11 18:54:30 christos Exp $       */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -41,7 +41,7 @@
 #if 0
 static char sccsid[] = "@(#)show.c     8.3 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: show.c,v 1.18 1999/10/08 21:10:44 pk Exp $");
+__RCSID("$NetBSD: show.c,v 1.19 2002/02/11 18:54:30 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -201,8 +201,8 @@
                        if (subtype == VSLENGTH)
                                putc('#', fp);
 
-                       while (*p != '=')
-                               putc(*p++, fp);
+                       while (*++p != '=')
+                               putc(*p, fp);
 
                        if (subtype & VSNUL)
                                putc(':', fp);



Home | Main Index | Thread Index | Old Index