From 57741a94d970b311dd23bb228dbc3297cf425d93 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Wed, 4 Jan 2012 03:30:34 +0100 Subject: [PATCH] fix random init error (division by zero possible) --- tests/components/proc/asset/meta/time-grid-basics-test.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/components/proc/asset/meta/time-grid-basics-test.cpp b/tests/components/proc/asset/meta/time-grid-basics-test.cpp index ea98b04bc..e90eb794a 100644 --- a/tests/components/proc/asset/meta/time-grid-basics-test.cpp +++ b/tests/components/proc/asset/meta/time-grid-basics-test.cpp @@ -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 (1 / testFps / fract); Time dirty(point + Time(dirt));