From fe2321ce22893fbd03cc1abc74a94e39883cabed Mon Sep 17 00:00:00 2001 From: Mike Parker Date: Thu, 24 Dec 2020 15:37:58 +0000 Subject: [PATCH] Use Math.Abs on guid hashcode to ensure > 0 --- src/dotnet/MonoGame.Extended.Particles/ParticleEmitter.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dotnet/MonoGame.Extended.Particles/ParticleEmitter.cs b/src/dotnet/MonoGame.Extended.Particles/ParticleEmitter.cs index 13b22b44..a7116869 100644 --- a/src/dotnet/MonoGame.Extended.Particles/ParticleEmitter.cs +++ b/src/dotnet/MonoGame.Extended.Particles/ParticleEmitter.cs @@ -11,7 +11,7 @@ namespace MonoGame.Extended.Particles { public unsafe class ParticleEmitter : IDisposable { - private readonly FastRandom _random = new FastRandom(Guid.NewGuid().GetHashCode()); + private readonly FastRandom _random = new FastRandom(Math.Abs(Guid.NewGuid().GetHashCode())); private float _totalSeconds; [JsonConstructor]