foxygit / fake-08-xbox360 Log in
commit 0a5f3dd151da1d4d98ef989414f69166ea94561d
Author:     Jon Bell <j.to.the.bell@gmail.com>
AuthorDate: Thu Aug 6 16:39:36 2020 -0600
Commit:     Jon Bell <j.to.the.bell@gmail.com>
CommitDate: Thu Aug 6 16:39:36 2020 -0600

    Update srand() to correctly seed param to 0
---
 source/p8GlobalLuaFunctions.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/source/p8GlobalLuaFunctions.h b/source/p8GlobalLuaFunctions.h
index e6f4d94..ca67547 100644
--- a/source/p8GlobalLuaFunctions.h
+++ b/source/p8GlobalLuaFunctions.h
@@ -98,6 +98,7 @@ function rnd(x)
 end

 function srand(seed)
+	seed = seed or 0
 	math.randomseed(flr(seed*0x10000))
 end