added restoring level number when interactively uploading tapes to server
authorHolger Schemel <info@artsoft.org>
Mon, 20 Sep 2021 21:15:00 +0000 (23:15 +0200)
committerHolger Schemel <info@artsoft.org>
Mon, 20 Sep 2021 21:15:00 +0000 (23:15 +0200)
src/tape.c

index 4c7dec9874b4822a349a7cc2bd72829cd4b23f82..f5d78c6a8cb14e5e2710780501538b73e35445af 100644 (file)
@@ -1466,6 +1466,7 @@ static int AutoPlayTapesExt(boolean initialize)
   };
   LevelDirTree *leveldir_current_last = leveldir_current;
   boolean init_level_set = FALSE;
+  int level_nr_last = level_nr;
   int i;
 
   if (!initialize)
@@ -1865,8 +1866,9 @@ static int AutoPlayTapesExt(boolean initialize)
   if (program.headless)
     CloseAllAndExit(0);
 
-  // when running interactively, restore last selected level set
+  // when running interactively, restore last selected level set and number
   leveldir_current = leveldir_current_last;
+  level_nr = level_nr_last;
 
   return num_tapes;
 }