Fixed: parser allowed command calls with one too few arguments

Sun, 26 Aug 2012 23:28:09 +0300

author
Teemu Piippo <crimsondusk64@gmail.com>
date
Sun, 26 Aug 2012 23:28:09 +0300
changeset 64
dc5db6335601
parent 63
0557babc8675
child 65
ec04357f5bb9

Fixed: parser allowed command calls with one too few arguments

parser.cxx file | annotate | diff | comparison | revisions
--- a/parser.cxx	Sun Aug 26 23:18:59 2012 +0300
+++ b/parser.cxx	Sun Aug 26 23:28:09 2012 +0300
@@ -678,7 +678,7 @@
 	int curarg = 0;
 	while (1) {
 		if (!token.compare (")")) {
-			if (curarg < comm->numargs - 1)
+			if (curarg < comm->numargs)
 				ParserError ("too few arguments passed to %s\n", comm->name.chars());
 			break;
 			curarg++;

mercurial