From b419b918093c9b366cea40eabc3fa4d0bf35e221 Mon Sep 17 00:00:00 2001 From: truelight Date: Mon, 13 Dec 2004 19:07:54 +0000 Subject: [PATCH] (svn r1067) -Add: [Console] Added comment for scripts (everything behind the # is ignored) (GeniusDex / sign_de) --- console_cmds.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/console_cmds.c b/console_cmds.c index a621962422..395afc3309 100644 --- a/console_cmds.c +++ b/console_cmds.c @@ -286,8 +286,9 @@ DEF_CONSOLE_CMD(ConExec) fgets(cmd, sizeof(cmd), _script_file); while (!feof(_script_file) && _script_running) { - strtok(cmd, "\r\n"); - IConsoleCmdExec(cmd); + strtok(cmd, "\r\n#"); + if (strlen(cmd) > 0 && cmd[0] != '#') + IConsoleCmdExec(cmd); fgets(cmd, sizeof(cmd), _script_file); }