Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/SetWinLocale | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale index e7ae3c0ced..8360c76840 100755 --- a/testbot/bin/SetWinLocale +++ b/testbot/bin/SetWinLocale @@ -397,19 +397,19 @@ if (!defined $Usage) $OptLocale ||= $OptDefault; $OptSystem ||= $OptDefault; $OptMUI ||= $OptDefault; - if (!defined $OptCountry and defined $OptDefault and - $OptDefault =~ /-([A-Z]{2})$/) + + if (!$OptCountry and ($OptDefault || "") =~ /-([A-Z]{2})$/) { $OptCountry = $1; } - if (defined $OptCountry) + if ($OptCountry) { - if (!exists $Countries{$OptCountry}) + $CountryId = $Countries{$OptCountry}; + if (!defined $CountryId) { Error("unknown country '$OptCountry'\n"); $Usage = 2; } - $CountryId = $Countries{$OptCountry}; }
if (!$OptLocale and !$OptSystem and !$OptMUI and !$OptKeyboard and