From 8246538bbb4efd3285597b89a2db2ac1b0e9b474 Mon Sep 17 00:00:00 2001 From: arookas Date: Mon, 1 Feb 2016 05:44:29 -0500 Subject: [PATCH] Ensure the seed is an integer --- stdlib/random.sun | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stdlib/random.sun b/stdlib/random.sun index ea54f5a..16eab03 100644 --- a/stdlib/random.sun +++ b/stdlib/random.sun @@ -5,10 +5,12 @@ * 2016 arookas \* ================================================= */ +import "ssc/common.sun"; + var local next; function srand(seed) { - next = seed; + next = int(seed); } function rand() {