# HG changeset patch # User nenolod # Date 1181340151 25200 # Node ID f121f2b1711aad75cc54fbbae371027c95293d42 # Parent e9b2d21cf0789f88deaf605b8ed86c1a2378e174 [svn] - use g_random_double_ranged() diff -r e9b2d21cf078 -r f121f2b1711a ChangeLog --- a/ChangeLog Fri Jun 08 14:24:30 2007 -0700 +++ b/ChangeLog Fri Jun 08 15:02:31 2007 -0700 @@ -1,3 +1,11 @@ +2007-06-08 21:24:30 +0000 William Pitcock + revision [2550] + - possible crash fixes wrt global regs + + trunk/src/paranormal/libcalc/dict.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + + 2007-06-08 18:19:25 +0000 William Pitcock revision [2548] - add general_evaluate which can run arbitrary VM code diff -r e9b2d21cf078 -r f121f2b1711a src/paranormal/libcalc/function.c --- a/src/paranormal/libcalc/function.c Fri Jun 08 14:24:30 2007 -0700 +++ b/src/paranormal/libcalc/function.c Fri Jun 08 15:02:31 2007 -0700 @@ -74,7 +74,7 @@ } static double f_rand (ex_stack *stack) { - return rand() % (int) pop(stack); + return g_random_double_range((double) pop(stack), (double) pop(stack)); } /* */