forked from mirror/DotRecast
fix: random size of an array for testing could be 0
This commit is contained in:
parent
0d4344dabb
commit
96e8b12772
|
@ -29,7 +29,7 @@ public class RcRentedArrayTest
|
||||||
{
|
{
|
||||||
RcRentedArray<int> rentedArray;
|
RcRentedArray<int> rentedArray;
|
||||||
{
|
{
|
||||||
int length = (int)(rand.Next() * 2048);
|
int length = Math.Max(2, (int)(rand.Next() * 2048));
|
||||||
var values = RandomValues(length);
|
var values = RandomValues(length);
|
||||||
using var array = RcRentedArray.RentDisposableArray<int>(length);
|
using var array = RcRentedArray.RentDisposableArray<int>(length);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue