X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Finit.c;h=0dc8ea0ddfb9a47b717c9cd35f03a368958a4915;hb=3e66c6792cc10afd72877d14eb00d63c3932e872;hp=d5120fb2df7c5e09fa6d4841b95956f8aa482c18;hpb=8d55afd03c67ddfe49d92701b06b288de6db939d;p=rocksndiamonds.git diff --git a/src/init.c b/src/init.c index d5120fb2..0dc8ea0d 100644 --- a/src/init.c +++ b/src/init.c @@ -5069,9 +5069,11 @@ static void Execute_Command(char *command) strPrefix(command, "autowarp ") || strPrefix(command, "autotest ") || strPrefix(command, "autosave ") || + strPrefix(command, "autoupload ") || strPrefix(command, "autofix ")) { - char *str_ptr = getStringCopy(&command[8]); // read command parameters + char *arg_ptr = strchr(command, ' '); + char *str_ptr = getStringCopy(arg_ptr); // read command parameters global.autoplay_mode = (strPrefix(command, "autoplay") ? AUTOPLAY_MODE_PLAY : @@ -5079,6 +5081,7 @@ static void Execute_Command(char *command) strPrefix(command, "autowarp") ? AUTOPLAY_MODE_WARP : strPrefix(command, "autotest") ? AUTOPLAY_MODE_TEST : strPrefix(command, "autosave") ? AUTOPLAY_MODE_SAVE : + strPrefix(command, "autoupload") ? AUTOPLAY_MODE_UPLOAD : strPrefix(command, "autofix") ? AUTOPLAY_MODE_FIX : AUTOPLAY_MODE_NONE);