Skip to content

Commit 6bcf6f8

Browse files
authored
Merge pull request #18 from morozov/data-size
Display proper data size in tape browser
2 parents b6b5cec + 1318613 commit 6bcf6f8

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tape.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -992,15 +992,17 @@ tape_block_details( char *buffer, size_t length,
992992
break;
993993

994994
normal:
995+
/* The -2 here is for the flag and parity bytes */
995996
snprintf( buffer, length, "%lu bytes",
996-
(unsigned long)libspectrum_tape_block_data_length( block ) );
997+
(unsigned long)libspectrum_tape_block_data_length( block ) - 2 );
997998
break;
998999

9991000
case LIBSPECTRUM_TAPE_BLOCK_TURBO:
10001001
case LIBSPECTRUM_TAPE_BLOCK_PURE_DATA:
10011002
case LIBSPECTRUM_TAPE_BLOCK_RAW_DATA:
1003+
/* The -2 here is for the flag and parity bytes */
10021004
snprintf( buffer, length, "%lu bytes",
1003-
(unsigned long)libspectrum_tape_block_data_length( block ) );
1005+
(unsigned long)libspectrum_tape_block_data_length( block ) - 2 );
10041006
break;
10051007

10061008
case LIBSPECTRUM_TAPE_BLOCK_PURE_TONE:

0 commit comments

Comments
 (0)