From 886d18800c530da0524337f081f78b6ecf44151f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Mon, 13 Jul 2026 02:18:25 +0100 Subject: [PATCH] Treat body capacity as logical capacity --- src/GameCult.Mesh/CultMeshBodies.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/GameCult.Mesh/CultMeshBodies.cs b/src/GameCult.Mesh/CultMeshBodies.cs index 8b06cd64..5b76e347 100644 --- a/src/GameCult.Mesh/CultMeshBodies.cs +++ b/src/GameCult.Mesh/CultMeshBodies.cs @@ -73,8 +73,8 @@ namespace GameCult.Mesh throw new InvalidOperationException("CultMesh body layout version mismatch."); if (descriptor.ProducerEpoch != request.ProducerEpoch) throw new InvalidOperationException("CultMesh body producer epoch mismatch."); - if (descriptor.ByteSize < 0 || descriptor.Capacity < 0 || descriptor.ByteSize > descriptor.Capacity) - throw new InvalidOperationException("CultMesh body size exceeds its declared capacity."); + if (descriptor.ByteSize < 0 || descriptor.Capacity < 0) + throw new InvalidOperationException("CultMesh body size and logical capacity must be non-negative."); if (descriptor.Sequence < 0) throw new InvalidOperationException("CultMesh body sequence must be non-negative."); if (descriptor.LeaseExpiresAtUnixMs <= request.NowUtc.ToUnixTimeMilliseconds())