fixed calculating tape engine version sub-types
authorHolger Schemel <holger.schemel@virtion.de>
Sat, 30 Nov 2024 10:23:10 +0000 (11:23 +0100)
committerHolger Schemel <holger.schemel@virtion.de>
Sat, 30 Nov 2024 10:23:18 +0000 (11:23 +0100)
src/tape.c

index b99e9b10d42bf83b828b7333b84f9def6fe365db..be363da08747b17a5e91157b8f7daeb854e85f5f 100644 (file)
@@ -2129,10 +2129,10 @@ static int AutoPlayTapesExt(boolean initialize)
              level_nr,  tape_patch_info,
              tape.length_seconds / 60, tape.length_seconds % 60,
              "not suitable for version",
-             (tape.engine_version / 1000000) % 100,
-             (tape.engine_version / 10000  ) % 100,
-             (tape.engine_version / 100    ) % 100,
-             (tape.engine_version          ) % 100);
+             VERSION_SUPER(tape.engine_version),
+             VERSION_MAJOR(tape.engine_version),
+             VERSION_MINOR(tape.engine_version),
+             VERSION_PATCH(tape.engine_version));
 
        skip_patch = TRUE;
       }
@@ -2279,10 +2279,10 @@ int AutoPlayTapesContinue(void)
 static boolean PatchTape(struct TapeInfo *tape, char *mode)
 {
   Print("[%d.%d.%d.%d]: ",
-       (tape->engine_version / 1000000) % 100,
-       (tape->engine_version / 10000  ) % 100,
-       (tape->engine_version / 100    ) % 100,
-       (tape->engine_version          ) % 100);
+       VERSION_SUPER(tape->engine_version),
+       VERSION_MAJOR(tape->engine_version),
+       VERSION_MINOR(tape->engine_version),
+       VERSION_PATCH(tape->engine_version));
 
   if (strEqual(mode, "info"))
   {