Skip to content

Commit bfe1dc3

Browse files
committed
fix math.randomseed with non literal number
1 parent ac26102 commit bfe1dc3

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

nattlua/definitions/lua/math.nlua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,8 @@ do -- random functions
194194
analyzer function math.randomseed(n: number)
195195
if not analyzer.enable_random_functions then return end
196196

197-
return math.randomseed(n:GetData())
197+
if n:IsLiteral() then
198+
return math.randomseed(n:GetData())
199+
end
198200
end
199201
end

0 commit comments

Comments
 (0)