From 476b5ec863c49bb9a85eda23fbba31cf0d3a443c Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Sat, 20 Oct 2001 11:30:24 +0000 Subject: [PATCH] $~ crashed if arglist was empty git-svn-id: http://svn.irssi.org/repos/irssi/trunk@1858 dbcabf3a-b0e7-0310-adc4-f8d773084564 --- src/core/special-vars.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/special-vars.c b/src/core/special-vars.c index 442342b6..4490139f 100644 --- a/src/core/special-vars.c +++ b/src/core/special-vars.c @@ -74,7 +74,7 @@ static char *get_argument(char **cmd, char **arglist) } str = g_string_new(NULL); - while (arg < argcount && (arg <= max || max == -1)) { + while (arg >= 0 && arg < argcount && (arg <= max || max == -1)) { g_string_append(str, arglist[arg]); g_string_append_c(str, ' '); arg++;