about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-04-05 07:38:48 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-04-05 07:38:48 +0000
commit605e7074bab498812d3b397b04692013445d5df6 (patch)
tree35d082dee50fc18fde441389b8198631d01154a0
parent15cd754da09d55a94f12ee17b39df3db7651c565 (diff)
downloadzcatch-605e7074bab498812d3b397b04692013445d5df6.tar.gz
zcatch-605e7074bab498812d3b397b04692013445d5df6.zip
added # comments to the console
-rw-r--r--src/engine/e_console.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/engine/e_console.c b/src/engine/e_console.c
index 607012da..71631bfa 100644
--- a/src/engine/e_console.c
+++ b/src/engine/e_console.c
@@ -230,15 +230,20 @@ void console_execute_line_stroked(int stroke, const char *str)
 		{
 			if(*end == '"')
 				in_string ^= 1;
-			else if(*end == '\\')
+			else if(*end == '\\') /* escape sequences */
 			{
 				if(end[1] == '"')
 					end++;
 			}
-			else if(!in_string && *end == ';')
+			else if(!in_string)
 			{
-				next_part = end+1;
-				break;
+				if(*end == ';')  /* command separator */
+				{
+					next_part = end+1;
+					break;
+				}
+				else if(*end == '#')  /* comment, no need to do anything more */
+					break;
 			}
 			
 			end++;