improved handling of command parameters when auto-processing tapes
authorHolger Schemel <info@artsoft.org>
Sat, 3 Jul 2021 11:40:12 +0000 (13:40 +0200)
committerHolger Schemel <info@artsoft.org>
Sat, 3 Jul 2021 11:40:12 +0000 (13:40 +0200)
src/init.c

index d5120fb2df7c5e09fa6d4841b95956f8aa482c18..0a44e0e5436906ad45913498a50d3a487f3545b5 100644 (file)
@@ -5071,7 +5071,8 @@ static void Execute_Command(char *command)
           strPrefix(command, "autosave ") ||
           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 :