fix: random size of an array for testing could be 0

This commit is contained in:
ikpil 2024-01-21 19:53:00 +09:00 committed by Ikpil
parent 0d4344dabb
commit 96e8b12772
1 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ public class RcRentedArrayTest
{
RcRentedArray<int> rentedArray;
{
int length = (int)(rand.Next() * 2048);
int length = Math.Max(2, (int)(rand.Next() * 2048));
var values = RandomValues(length);
using var array = RcRentedArray.RentDisposableArray<int>(length);