summaryrefslogtreecommitdiff
path: root/bin/tibtoa
diff options
context:
space:
mode:
Diffstat (limited to 'bin/tibtoa')
-rwxr-xr-xbin/tibtoa6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/tibtoa b/bin/tibtoa
index a9cd03a..2837880 100755
--- a/bin/tibtoa
+++ b/bin/tibtoa
@@ -8,6 +8,8 @@ use utf8;
use Getopt::Std;
binmode(STDOUT, ':utf8');
+my $header = 74;
+my $footer = 2;
my ($char, $char2);
my $out;
my $cache;
@@ -618,12 +620,12 @@ getopts('i', \%opts);
open(PRGM, '<', shift) or die;
binmode(PRGM);
# Remove header added by tilp2
-seek(PRGM, 74, 0);
+seek(PRGM, $header, 0);
$program = <PRGM>;
close(PRGM);
# The last two bytes don't contain program code
-substr($program, -2, 2, '');
+substr($program, -$footer, $footer, '');
$length = length($program);
$offset = 0;