From f056b2796949f81567f64a857282a32d4e15bfb6 Mon Sep 17 00:00:00 2001 From: Rick L Bird Date: Thu, 5 May 2011 16:55:48 -0400 Subject: [PATCH] PennMUSH 1.8.3p11 Author: talvo@talvo.com Date: Mon Dec 28 01:34:53 2009 +0000 Fix bug in command parser Fixes #161 --- src/command.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/command.c b/src/command.c index d9833da..1b68689 100644 --- a/src/command.c +++ b/src/command.c @@ -1305,7 +1305,8 @@ command_parse(dbref player, dbref cause, dbref realcause, char *string, int from int lsa_index; if (lsa[1]) { safe_str(lsa[1], commandraw, &c2); - for (lsa_index = 2; lsa[lsa_index]; lsa_index++) { + for (lsa_index = 2; (lsa_index < MAX_ARG) && lsa[lsa_index]; lsa_index++) { + safe_chr(',', commandraw, &c2); safe_str(lsa[lsa_index], commandraw, &c2); } @@ -1322,7 +1323,7 @@ command_parse(dbref player, dbref cause, dbref realcause, char *string, int from * starts at 1. */ if (rsa[1]) { safe_str(rsa[1], commandraw, &c2); - for (rsa_index = 2; rsa[rsa_index]; rsa_index++) { + for (rsa_index = 2; (rsa_index < MAX_ARG) && rsa[rsa_index]; rsa_index++) { safe_chr(',', commandraw, &c2); safe_str(rsa[rsa_index], commandraw, &c2); } -- 2.30.2