Quick fix for a buffer overrun issue.

This commit is contained in:
Jamie Greunbaum 2026-05-14 16:13:58 -04:00
parent cb04ea8dd2
commit edc90eba48

View File

@ -169,7 +169,7 @@ public class CaseVideoSyncPlayer : UdonSharpBehaviour
// Concatenate both caches into a new bigger cache and await new downloads as usual // Concatenate both caches into a new bigger cache and await new downloads as usual
int[] NewMapIndicesCache = new int[_CachedMapIndices.Length + MapIndices.Length]; int[] NewMapIndicesCache = new int[_CachedMapIndices.Length + MapIndices.Length];
Texture2D[] NewMapImages = new Texture2D[_CachedMapIndices.Length + MapIndices.Length]; Texture2D[] NewMapImages = new Texture2D[_CachedMapIndices.Length + MapIndices.Length];
for (int i = 0; i < _CachedMapIndices.Length; i++) for (int i = 0; i < _CachedMapIndices.Length && i < _MapImages.Length; i++)
{ {
NewMapIndicesCache[i] = _CachedMapIndices[i]; NewMapIndicesCache[i] = _CachedMapIndices[i];
NewMapImages[i] = _MapImages[i]; NewMapImages[i] = _MapImages[i];