Fix sandbox error with new HWID code. (#33461)

Oops
This commit is contained in:
Pieter-Jan Briers 2024-11-22 18:14:46 +01:00 committed by Milon
parent 26b36db09d
commit 318b0520ca
1 changed files with 3 additions and 1 deletions

View File

@ -34,7 +34,9 @@ public sealed class ImmutableTypedHwid(ImmutableArray<byte> hwid, HwidType type)
return false;
}
hwid = new ImmutableTypedHwid([..array], type);
// ReSharper disable once UseCollectionExpression
// Do not use collection expression, C# compiler is weird and it fails sandbox.
hwid = new ImmutableTypedHwid(ImmutableArray.Create(array), type);
return true;
}