From b30f7a818bde09ecd948954bea6ac2f763ec0698 Mon Sep 17 00:00:00 2001 From: routersys Date: Thu, 2 Jul 2026 19:03:41 +0900 Subject: [PATCH] =?UTF-8?q?draw=E3=83=AA=E3=83=B3=E3=82=B0=E3=81=AE?= =?UTF-8?q?=E8=AA=AD=E3=81=BF=E5=87=BA=E3=81=97=E4=BB=B6=E6=95=B0=E3=82=92?= =?UTF-8?q?=E5=AE=B9=E9=87=8F=E3=81=B8=E3=82=AF=E3=83=A9=E3=83=B3=E3=83=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LuaScript/Engine/LuaJitWorker.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LuaScript/Engine/LuaJitWorker.cs b/LuaScript/Engine/LuaJitWorker.cs index 8000313..2996b41 100644 --- a/LuaScript/Engine/LuaJitWorker.cs +++ b/LuaScript/Engine/LuaJitWorker.cs @@ -335,7 +335,7 @@ namespace LuaScript.Engine private void DrainDrawRing(MemoryMappedViewAccessor view, Action addDraw) { long ringBase = NativeProtocol.DrawRingOffset(_stringParamsCapacity); - int count = (int)view.ReadDouble(ringBase); + int count = Math.Clamp((int)view.ReadDouble(ringBase), 0, NativeProtocol.DrawRingCapacity); for (int k = 0; k < count; k++) { long entry = ringBase + (1 + (long)k * NativeProtocol.DrawEntryDoubles) * 8;