chiark / gitweb /
routesearch: actually print number of routes requested, not one less
authorIan Jackson <ian@liberator.(none)>
Thu, 15 Oct 2009 18:56:42 +0000 (19:56 +0100)
committerIan Jackson <ian@liberator.(none)>
Thu, 15 Oct 2009 18:56:42 +0000 (19:56 +0100)
yarrg/TODO
yarrg/rsmain.c
yarrg/rssearch.c

index efffc688d4af6695aae616b820f761247611010c..cc4348d6c098339280ac09a0e32a7430360c58b2 100644 (file)
@@ -1,8 +1,5 @@
 Doesn't spot routesearch dying
 
-http://localhost/cgi-bin/mason/yarrg/lookup?islandstring=eta%2C+cnossos%2C+alpha%2C+turtle%2C+luthien%2C+xi%2C+delta&capacitystring=sloop-30rum&capitalstring=&lossperleague=0.05%25&distance=30&submit=Go&query=routesearch&routestring=&debug=1
- mysteriously gives only 9 abs routes
-
 
 UPLOADER
 --------
index a784ae383ef3fa521bc86f7c1d1ce929914f2eaf..2e1c500308658ed53c60a49e7b9fc3f64590a268 100644 (file)
@@ -185,7 +185,7 @@ int main(int argc, const char **argv) {
          int midarch= route2midarch(ports,nports);
          fprintf(output,
                  " @%2d %c#%2d | start%3d mid%d:%3d f%d:%3d | %5d %5d %4d |",
-                 pos, "ap"[ap], nhighscores[granui][ap] - 1 - pos,
+                 pos, "ap"[ap], nhighscores[granui][ap] - pos,
                  ports[0], midarch,midisle, finarch,finisle,
                  (int)hs->value, (int)pr->value[A], (int)pr->value[P]);
          for (i=0; i<nports; i++) fprintf(output," %d",ports[i]);
index 23d2ece5eb8541ccc2616fd8ae749d0966759b3b..881d5de4ba7d0550cd9533056d7bf863291b64d7 100644 (file)
@@ -162,7 +162,7 @@ static double process_route(int nports, int totaldist,
       found:
        for (;;) {
          pos++;
-         if (pos >= nscores-1) break; /* new top */
+         if (pos >= nscores) break; /* new top */
          if (scores[pos].value >= value[ap]) break; /* found spot */
          if (pos>0)
            scores[pos-1]= scores[pos];