Fix writing searchTime in tourneyFile
authorH.G. Muller <h.g.muller@hccnet.nl>
Wed, 29 Jun 2011 18:29:12 +0000 (20:29 +0200)
committerH.G. Muller <h.g.muller@hccnet.nl>
Wed, 29 Jun 2011 18:29:12 +0000 (20:29 +0200)
This had to be derived from the variable searchTime, which gives it
in seconds, as appData.searchTime (a string in minutes) is not reliable,
as it contains the command-line value, which might have been altered
through the time-control dialog.

backend.c

index a1c3c86..15af6e7 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -9683,7 +9683,7 @@ WriteTourneyFile(char *results)
        fprintf(f, "-loadPositionIndex %d\n", appData.loadPositionIndex);
        fprintf(f, "-rewindIndex %d\n", appData.rewindIndex);
        if(searchTime > 0)
        fprintf(f, "-loadPositionIndex %d\n", appData.loadPositionIndex);
        fprintf(f, "-rewindIndex %d\n", appData.rewindIndex);
        if(searchTime > 0)
-               fprintf(f, "-searchTime \"%s\"\n", appData.searchTime);
+               fprintf(f, "-searchTime \"%d:%02d\"\n", searchTime/60, searchTime%60);
        else {
                fprintf(f, "-mps %d\n", appData.movesPerSession);
                fprintf(f, "-tc %s\n", appData.timeControl);
        else {
                fprintf(f, "-mps %d\n", appData.movesPerSession);
                fprintf(f, "-tc %s\n", appData.timeControl);