From 37df28356841e2365d577044e659bc6fffd195c7 Mon Sep 17 00:00:00 2001 From: FJBP-code Date: Sun, 22 Nov 2026 19:52:02 +0100 Subject: [PATCH] RageModelDecoder: allow zero bounding-sphere radius in LooksLikeDrawableHeader --- Core/RageModelDecoder.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Core/RageModelDecoder.cs b/Core/RageModelDecoder.cs index 870f0df..cf93fef 100644 --- a/Core/RageModelDecoder.cs +++ b/Core/RageModelDecoder.cs @@ -121,7 +121,7 @@ private static bool LooksLikeDrawableHeader(ReadOnlySpan prefix, bool embe !(SystemPointer(name) || (embedded && name == 0))) return false; Vector3 min = ReadVector(prefix, 48), max = ReadVector(prefix, 64); float radius = BinaryPrimitives.ReadSingleLittleEndian(prefix[44..]); - return ValidBounds(min, max) && float.IsFinite(radius) && radius is > 0 and < 1_000_000; + return ValidBounds(min, max) && float.IsFinite(radius) && radius is >= 0 and < 1_000_000; } public static RageModel? Inspect(ReadOnlySpan system, ReadOnlySpan graphics) => Decode(system, graphics);