Bug 0003

Movie: Rars loops infinitely when replaying a movie
Version 0.72
Solved in 0.73c
File carz.cpp
Owner Marc Gueury
Platform ALL
Impact on cars NONE
Impact on portability NONE


It seems that there is a small bug in the replay of a movie
that happens not very often. It loops infinitely in the function
sortem because of a wrong line in the function farther farther.

In carz.cpp
  int farther(Car* car0, Car* car1)
     if(car0->laps > car1->laps)
        return 0;
     else if(car0->laps < car1->laps)
        return 1;                              // else laps are equal
     else if(car0->distance > car1->distance)
        return 0;
     else if(car0->distance < car1->distance)
        return 1;
->   else return 1;        // returns 1 in case of total equality


This is wrong, it should return 0.

     else return 0;        // returns 0 in case of total equality