From 2e515855c5e672883a671b68d6347aecf251d066 Mon Sep 17 00:00:00 2001 From: ayin Date: Tue, 9 Oct 2007 15:23:59 +0000 Subject: [PATCH] *** empty log message *** --- src/xdefaults.C | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/xdefaults.C b/src/xdefaults.C index 0c431393..bfddb7e7 100644 --- a/src/xdefaults.C +++ b/src/xdefaults.C @@ -549,7 +549,7 @@ rxvt_term::get_options (int argc, const char *const *argv) if (optList[entry].doff != -1) { - if (flag == resval_on && !argv [i+1]) + if (flag == resval_on && i+1 == argc) rxvt_fatal ("option '%s' needs an argument, aborting.\n", argv [i]); rs[optList[entry].doff] = flag == resval_on ? argv[++i] : resval_undef; @@ -567,10 +567,8 @@ rxvt_term::get_options (int argc, const char *const *argv) #ifdef KEYSYM_RESOURCE if (!strncmp (opt, "keysym.", sizeof ("keysym.") - 1)) { - const char *str = argv[++i]; - - if (str != NULL) - parse_keysym (opt + sizeof ("keysym.") - 1, str); + if (i+1 < argc) + parse_keysym (opt + sizeof ("keysym.") - 1, argv[++i]); } else #endif -- 2.34.1