drawリングの読み出し件数を容量へクランプ

このコミットが含まれているのは:
routersys committed 2026-07-02 19:03:41 +09:00
1 親 95786a1f0a
コミット b30f7a818b
1ファイル変更
+1 -1
+1 -1
ファイルの表示
@@ -335,7 +335,7 @@ namespace LuaScript.Engine
private void DrainDrawRing(MemoryMappedViewAccessor view, Action<DrawCommand> 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;