]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix sandbox error with new HWID code. (#33461)
authorPieter-Jan Briers <pieterjan.briers+git@gmail.com>
Fri, 22 Nov 2024 17:14:46 +0000 (18:14 +0100)
committerGitHub <noreply@github.com>
Fri, 22 Nov 2024 17:14:46 +0000 (18:14 +0100)
Oops

Content.Shared.Database/TypedHwid.cs

index 6e4a7763b3a516f4df27b45b5a735f94ca88354a..253375e9dbcd0278ec611f812489a583b152338e 100644 (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;
     }