From d4682ff452d8e21f5b17bbdaee4ecdb1cf024419 Mon Sep 17 00:00:00 2001 From: Sam Hartman Date: Mon, 14 Oct 1996 06:28:48 +0000 Subject: [PATCH] Environment command argument handling sometimes prints bogus only. [75] git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9163 dc483132-0cff-0310-8789-dd5450dbe970 --- src/appl/telnet/telnet/ChangeLog | 8 +++++++- src/appl/telnet/telnet/commands.c | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/appl/telnet/telnet/ChangeLog b/src/appl/telnet/telnet/ChangeLog index 91cbb7d57..6f9c1ba93 100644 --- a/src/appl/telnet/telnet/ChangeLog +++ b/src/appl/telnet/telnet/ChangeLog @@ -1,6 +1,12 @@ +Mon Oct 14 02:22:16 1996 Sam Hartman + + * commands.c (env_cmd): Print only' at correct times. Patch from + jhawk. [ +75] Sat Sep 21 03:47:46 1996 Sam Hartman - * telnet.c (telnet): Only support XDISPLOC if DISPLAY is supported, thanks to jik. + * telnet.c (telnet): Only support XDISPLOC if DISPLAY is + supported, thanks to jik. * commands.c (tn): Save away arguments before memory used by other functions. Patch thanks to jik. diff --git a/src/appl/telnet/telnet/commands.c b/src/appl/telnet/telnet/commands.c index 52209d319..196b3fe4b 100644 --- a/src/appl/telnet/telnet/commands.c +++ b/src/appl/telnet/telnet/commands.c @@ -1661,7 +1661,7 @@ env_cmd(argc, argv) if (c->narg + 2 != argc) { fprintf(stderr, "Need %s%d argument%s to 'environ %s' command. 'environ ?' for help.\n", - c->narg < argc + 2 ? "only " : "", + c->narg < argc - 2 ? "only " : "", c->narg, c->narg == 1 ? "" : "s", c->name); return 0; } -- 2.26.2