summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/core/special-vars.c2
1 files changed, 1 insertions, 1 deletions
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++;