From 326ae5bd9572a9721703db868c8b77236bb166cf Mon Sep 17 00:00:00 2001 From: divverent Date: Sat, 27 Jun 2009 20:07:30 +0000 Subject: [PATCH] properly handle comments when looking for final ; of a line git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9035 d7cf8633-e32d-0410-b094-e92efae38249 --- cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd.c b/cmd.c index b6fab2d2..391b0c7b 100644 --- a/cmd.c +++ b/cmd.c @@ -321,7 +321,7 @@ void Cbuf_Execute (void) } else { - if(text[i] == '/' && text[i + 1] == '/') + if(text[i] == '/' && text[i + 1] == '/' && (i == 0 || ISWHITESPACE(text[i-1]))) comment = true; if(text[i] == ';') break; // don't break if inside a quoted string or comment -- 2.39.2