summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/eval.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index bb869f2..ee78154 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-05-03  Gerrit Pape <pape@smarden.org>
+
+	* Fix command -- crash.
+
 2010-04-15  H. Peter Anvin <hpa@zytor.com>
 
 	* Fix for job control off warning.
diff --git a/src/eval.c b/src/eval.c
index 2f195af..62d9d5d 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -651,7 +651,8 @@ parse_command_args(char **argv, const char **path)
 		if (!(c = *cp++))
 			break;
 		if (c == '-' && !*cp) {
-			argv++;
+			if (!*++argv)
+				return 0;
 			break;
 		}
 		do {