Signed-off-by: Francois Gouget fgouget@codeweavers.com --- v2: Fixed the authorship.
testbot/bin/SetWinLocale | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/testbot/bin/SetWinLocale b/testbot/bin/SetWinLocale index f76f59ab37..3a74406a49 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