changeset 24816:ba929c5ee0bc

Fix input command parser for using only tab to separate the arguments.
author ulion
date Tue, 23 Oct 2007 00:44:22 +0000
parents c10db72e1afc
children d30cb71c0103
files input/input.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/input/input.c	Tue Oct 23 00:06:08 2007 +0000
+++ b/input/input.c	Tue Oct 23 00:44:22 2007 +0000
@@ -754,8 +754,8 @@
   ptr = str;
 
   for(i=0; ptr && i < MP_CMD_MAX_ARGS; i++) {
-    ptr = strchr(ptr,' ');
-    if(!ptr) break;
+    while(ptr[0] != ' ' && ptr[0] != '\t' && ptr[0] != '\0') ptr++;
+    if(ptr[0] == '\0') break;
     while(ptr[0] == ' ' || ptr[0] == '\t') ptr++;
     if(ptr[0] == '\0') break;
     cmd->args[i].type = cmd_def->args[i].type;