From c00185eaf66f6f06a41b955f9d829929cefabb59 Mon Sep 17 00:00:00 2001 From: shavitush Date: Sat, 3 Jun 2017 21:36:39 +0300 Subject: [PATCH] Just to be sure.. --- scripting/shavit-core.sp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripting/shavit-core.sp b/scripting/shavit-core.sp index 51628cd5..7fcce201 100644 --- a/scripting/shavit-core.sp +++ b/scripting/shavit-core.sp @@ -970,13 +970,15 @@ public void OnClientCookiesCached(int client) } gB_Auto[client] = (strlen(sCookie) > 0)? view_as(StringToInt(sCookie)):true; + int style = 0; if(gH_StyleCookie != null) { GetClientCookie(client, gH_StyleCookie, sCookie, 4); + style = StringToInt(sCookie); } - gBS_Style[client] = view_as((strlen(sCookie) > 0)? StringToInt(sCookie):0); + gBS_Style[client] = view_as((style >= 0 && style < gI_Styles)? style:0); UpdateAutoBhop(client); }