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 efffc68..cc4348d 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 a784ae3..2e1c500 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 23d2ece..881d5de 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];