From 0c3ba1e37878de92076790d36df1c41e27eef164 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Wed, 25 Jan 2017 12:48:01 -0600 Subject: [PATCH] FS-9978: [mod_expr] mod_expr random seed function not working for Windows #resolve --- src/mod/applications/mod_expr/exprilfs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mod/applications/mod_expr/exprilfs.h b/src/mod/applications/mod_expr/exprilfs.h index 7efc281c16..05abb5f12b 100644 --- a/src/mod/applications/mod_expr/exprilfs.h +++ b/src/mod/applications/mod_expr/exprilfs.h @@ -496,9 +496,10 @@ case EXPR_NODEFUNC_RANDOMIZE: { static int curcall = 0; - curcall++; + curcall += clock() + time(NULL); + curcall = curcall * 31821U + 13849U; - *(nodes->data.function.refs[0]) = (EXPRTYPE) ((clock() + 1024 + curcall) * time(NULL)); + *(nodes->data.function.refs[0]) = (EXPRTYPE) curcall; break; }