scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | README | LICENSE

commit 52cc1d49916038e9ea6228d790e06d39d6c4802a
parent 64c6767a017f7c7dd1b34fd7f6fe2a7e3060a35f
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Fri,  5 Oct 2018 13:56:24 +0100

Fix rand()

The seed should be unsigned long, otherwise you can
have overflow problems.

Diffstat:
Mlib/c/rand.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/c/rand.c b/lib/c/rand.c @@ -2,7 +2,7 @@ #undef rand #undef srand -static int next; +static unsigned long next; void srand(unsigned seed)