From 3579e35d2b8ed951db24cc4873c155fded7f4375 Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 15 Oct 2009 19:56:42 +0100 Subject: [PATCH] routesearch: actually print number of routes requested, not one less --- yarrg/TODO | 3 --- yarrg/rsmain.c | 2 +- yarrg/rssearch.c | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/yarrg/TODO b/yarrg/TODO index efffc68..cc4348d 100644 --- a/yarrg/TODO +++ b/yarrg/TODO @@ -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 -------- diff --git a/yarrg/rsmain.c b/yarrg/rsmain.c index a784ae3..2e1c500 100644 --- a/yarrg/rsmain.c +++ b/yarrg/rsmain.c @@ -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= 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]; -- 2.30.2