Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/vi/ex Don't dump core when a ``bad address'' error o...



details:   https://anonhg.NetBSD.org/src/rev/6db9c06f3d0f
branches:  trunk
changeset: 502227:6db9c06f3d0f
user:      aymeric <aymeric%NetBSD.org@localhost>
date:      Sun Jan 14 02:22:29 2001 +0000

description:
Don't dump core when a ``bad address'' error occurs and there is neither
a file nor a command underlying it.
This fixes PR #11543.

diffstat:

 usr.bin/vi/ex/ex.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r 663faaed8d4a -r 6db9c06f3d0f usr.bin/vi/ex/ex.c
--- a/usr.bin/vi/ex/ex.c        Sun Jan 14 02:10:01 2001 +0000
+++ b/usr.bin/vi/ex/ex.c        Sun Jan 14 02:22:29 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ex.c,v 1.9 2000/10/11 19:28:43 thorpej Exp $   */
+/*     $NetBSD: ex.c,v 1.10 2001/01/14 02:22:29 aymeric Exp $  */
 
 /*-
  * Copyright (c) 1992, 1993, 1994
@@ -2294,7 +2294,7 @@
         * underlying file, that's the real problem.
         */
        if (sp->ep == NULL) {
-               ex_emsg(sp, cp->name, EXM_NOFILEYET);
+               ex_emsg(sp, cp != NULL? cp->name : NULL, EXM_NOFILEYET);
                return;
        }
 



Home | Main Index | Thread Index | Old Index