From 12cdd158bf268c0b3e06a7f90113d49e3b00d0e9 Mon Sep 17 00:00:00 2001 From: uifdev <154449940+uifdev@users.noreply.github.com> Date: Sun, 9 Feb 2025 20:46:21 +0100 Subject: [PATCH] Verify core_random() parameter --- source/amx/amxcore.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/amx/amxcore.c b/source/amx/amxcore.c index 1ee67c2..c8197e6 100644 --- a/source/amx/amxcore.c +++ b/source/amx/amxcore.c @@ -439,6 +439,8 @@ static cell AMX_NATIVE_CALL core_random(AMX *amx,const cell *params) #else cell value = abs(params[1]); #endif + + if(value <= 1) return 0; /* one-time initialization (or, mostly one-time) */ #if !defined SN_TARGET_PS2 && !defined _WIN32_WCE && !defined __ICC430__