5930 Regripper update for Perl 2020 bug fix

This commit is contained in:
William Schaefer 2020-01-06 12:03:06 -05:00
parent 838884da01
commit 12791d3da6
6 changed files with 34 additions and 10 deletions

View File

@ -161,14 +161,26 @@ sub unpack_windows_time {
# The equation can be found in several places on the Net.
# My thanks go to Dan Sully for Audio::WMA's _fileTimeToUnixTime
# which shows a perl implementation of it.
my ($low, $high) = unpack("VV", $data);
my $filetime = $high * 2 ** 32 + $low;
my $epoch_time = int(($filetime - 116444736000000000) / 10000000);
my ($lo, $hi) = unpack("VV", $data);
# my $filetime = $high * 2 ** 32 + $low;
# my $epoch_time = int(($filetime - 116444736000000000) / 10000000);
my $epoch_time;
if ($lo == 0 && $hi == 0) {
$epoch_time = 0;
} else {
$lo -= 0xd53e8000;
$hi -= 0x019db1de;
$epoch_time = int($hi*429.4967296 + $lo/1e7);
};
$epoch_time = 0 if ($epoch_time < 0);
# adjust the UNIX epoch time to the local OS's epoch time
# (see perlport's Time and Date section)
my $epoch_offset = timegm(0, 0, 0, 1, 0, 70);
$epoch_time += $epoch_offset;
# my $epoch_offset = timegm(0, 0, 0, 1, 0, 70);
# $epoch_time += $epoch_offset;
if ($epoch_time < 0 || $epoch_time > 0x7fffffff) {
$epoch_time = undef;

Binary file not shown.

Binary file not shown.

View File

@ -161,14 +161,26 @@ sub unpack_windows_time {
# The equation can be found in several places on the Net.
# My thanks go to Dan Sully for Audio::WMA's _fileTimeToUnixTime
# which shows a perl implementation of it.
my ($low, $high) = unpack("VV", $data);
my $filetime = $high * 2 ** 32 + $low;
my $epoch_time = int(($filetime - 116444736000000000) / 10000000);
my ($lo, $hi) = unpack("VV", $data);
# my $filetime = $high * 2 ** 32 + $low;
# my $epoch_time = int(($filetime - 116444736000000000) / 10000000);
my $epoch_time;
if ($lo == 0 && $hi == 0) {
$epoch_time = 0;
} else {
$lo -= 0xd53e8000;
$hi -= 0x019db1de;
$epoch_time = int($hi*429.4967296 + $lo/1e7);
};
$epoch_time = 0 if ($epoch_time < 0);
# adjust the UNIX epoch time to the local OS's epoch time
# (see perlport's Time and Date section)
my $epoch_offset = timegm(0, 0, 0, 1, 0, 70);
$epoch_time += $epoch_offset;
# my $epoch_offset = timegm(0, 0, 0, 1, 0, 70);
# $epoch_time += $epoch_offset;
if ($epoch_time < 0 || $epoch_time > 0x7fffffff) {
$epoch_time = undef;

BIN
thirdparty/rr/rip.exe vendored

Binary file not shown.

BIN
thirdparty/rr/rr.exe vendored

Binary file not shown.