From 236863f163db6a700db2d2ea780688f20c00d316 Mon Sep 17 00:00:00 2001 From: james <> Date: Wed, 12 Mar 2008 01:30:23 +0000 Subject: *** empty log message *** --- apps/sympathy.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'apps/sympathy.c') diff --git a/apps/sympathy.c b/apps/sympathy.c index b19cb94..5cb7e16 100644 --- a/apps/sympathy.c +++ b/apps/sympathy.c @@ -11,6 +11,9 @@ static char rcsid[] = /* * $Log$ + * Revision 1.44 2008/03/12 01:30:23 james + * *** empty log message *** + * * Revision 1.43 2008/03/12 01:26:56 james * *** empty log message *** * @@ -720,11 +723,11 @@ main (int argc, char *argv[]) } if (oflags['p']) { - if (optind t = ptty_open (argv[optind], &argv[optind], &size); - } else { - ctx->t = ptty_open (NULL, NULL, &size); - } + if (optind < argc) { + ctx->t = ptty_open (argv[optind], &argv[optind], &size); + } else { + ctx->t = ptty_open (NULL, NULL, &size); + } if (!ctx->t) fatal_moan ("unable to open a ptty"); -- cgit v1.2.3