[Tools 2/3] winetest/dissect: Require the platform fields to be present.
Francois Gouget
fgouget at codeweavers.com
Sat Jun 3 17:40:05 CDT 2017
Without them we were getting a lot of undefined value perl errors.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
winetest/dissect | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/winetest/dissect b/winetest/dissect
index ccfb15f5..36ab6358 100755
--- a/winetest/dissect
+++ b/winetest/dissect
@@ -236,6 +236,10 @@ while (($_ = <IN>) =~ /^\s*([0-9a-zA-Z ]+)=(.*?)\r?$/) {
}
$box->{data} .= "</table>\n";
+if (!defined $plid or !defined $major or !defined $minor or !defined $product) {
+ mydie "missing a PlatformId, dwMajorVersion, dwMinorVersion or wProductType field";
+}
+
my @idmatch = (
# Describes how to match a platform's version information
# with a dissect platform id:
@@ -284,7 +288,7 @@ if ($wine) {
"Darwin" => "mac",
"FreeBSD" => "bsd",
"SunOS" => "solaris" );
- $version = $host && defined($known_hosts{$host}) ? $known_hosts{$host} : "wine";
+ $version = $known_hosts{$host || ""} || "wine";
}
if ($wine_build) {
my $wine_commit;
--
2.11.0
More information about the wine-patches
mailing list