fix random init error (division by zero possible)

This commit is contained in:
Fischlurch 2012-01-04 03:30:34 +01:00
parent fa5e7db2d3
commit 57741a94d9

View file

@ -103,7 +103,7 @@ namespace test {
Time point (myGrid->timeOf (randomFrame));
CHECK (point == testOrigin + randomFrame * testFps.duration());
uint fract = rand() % DIRT_GRAIN;
uint fract = 1 + rand() % DIRT_GRAIN;
FSecs dirt = rational_cast<FSecs> (1 / testFps / fract);
Time dirty(point + Time(dirt));