On Wed, 10 Aug 2016 at 14:19 Tom Worster <f...@thefsb.org> wrote:

> Your fix seems fine for rand() but less so for mt_rand().
>
> Applying this fix will break much less mt_rand()-using code than not
> applying it will break rand()-using code. From that point of view,
> applying it is the better choice.
>
> Otoh, it's like copy-pasting a weird old bug from rand() to mt_rand().
> The plan was to make rand() alias mt_rand(). Now I'm not sure that's a
> smart plan.
>
> Tom
>

I've pushed a fix that keeps the old behaviour for both

I've un-aliased rand from mt_rand, added a min > max check to rand, and
then call the common code with parameters reversed if necessary.

Reply via email to