From: Ian Jackson Date: Thu, 15 Oct 2009 18:56:42 +0000 (+0100) Subject: routesearch: actually print number of routes requested, not one less X-Git-Tag: 5.0^2~35 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=commitdiff_plain;h=3579e35d2b8ed951db24cc4873c155fded7f4375 routesearch: actually print number of routes requested, not one less --- 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];