chiark / gitweb /
yarrg/commod-results-processor: fix potential pctb upload bug
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 4 Sep 2010 15:10:49 +0000 (16:10 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Sat, 4 Sep 2010 15:10:49 +0000 (16:10 +0100)
Only look at islands[] entries for correct ocean

yarrg/commod-results-processor

index 3482381..d427f74 100755 (executable)
@@ -550,10 +550,11 @@ sub main__uploadpctb () {
 
     my $islandid;
     while ($resptxt =~
- m/^islands\[\d+\]\[\d+\]\=new\s+option\(\"(.*)\"\,(\d+)\)\s*$/mig
+ m/^islands\[(\d+)\]\[\d+\]\=new\s+option\(\"(.*)\"\,(\d+)\)\s*$/mig
           ) {
-       next unless $1 eq $island;
-       $islandid= $2;
+       next unless $1 eq $oceanids[0];
+       next unless $2 eq $island;
+       $islandid= $3;
     }
     defined $islandid or die;