From: divverent Date: Sat, 27 Jun 2009 20:07:30 +0000 (+0000) Subject: properly handle comments when looking for final ; of a line X-Git-Tag: xonotic-v0.1.0preview~1590 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=326ae5bd9572a9721703db868c8b77236bb166cf;p=xonotic%2Fdarkplaces.git 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 --- 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