diff --git a/src/Ryujinx.HLE/HOS/Horizon.cs b/src/Ryujinx.HLE/HOS/Horizon.cs index c585aed54..f9c5ddecf 100644 --- a/src/Ryujinx.HLE/HOS/Horizon.cs +++ b/src/Ryujinx.HLE/HOS/Horizon.cs @@ -341,7 +341,7 @@ public void ScanAmiibo(int nfpDeviceId, string amiiboId, bool useRandomUuid) { if (VirtualAmiibo.ApplicationBytes.Length > 0) { - VirtualAmiibo.ApplicationBytes = new byte[0]; + VirtualAmiibo.ApplicationBytes = Array.Empty(); VirtualAmiibo.InputBin = string.Empty; } if (NfpDevices[nfpDeviceId].State == NfpDeviceState.SearchingForTag) @@ -356,7 +356,7 @@ public void ScanAmiiboFromBin(string path) VirtualAmiibo.InputBin = path; if (VirtualAmiibo.ApplicationBytes.Length > 0) { - VirtualAmiibo.ApplicationBytes = new byte[0]; + VirtualAmiibo.ApplicationBytes = Array.Empty(); } byte[] encryptedData = File.ReadAllBytes(path); VirtualAmiiboFile newFile = AmiiboBinReader.ReadBinFile(encryptedData); diff --git a/src/Ryujinx.HLE/HOS/Services/Nfc/Nfp/VirtualAmiibo.cs b/src/Ryujinx.HLE/HOS/Services/Nfc/Nfp/VirtualAmiibo.cs index ee43fc307..2cb35472f 100644 --- a/src/Ryujinx.HLE/HOS/Services/Nfc/Nfp/VirtualAmiibo.cs +++ b/src/Ryujinx.HLE/HOS/Services/Nfc/Nfp/VirtualAmiibo.cs @@ -16,7 +16,7 @@ namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp static class VirtualAmiibo { public static uint OpenedApplicationAreaId; - public static byte[] ApplicationBytes = new byte[0]; + public static byte[] ApplicationBytes = Array.Empty(); public static string InputBin = string.Empty; public static string NickName = string.Empty; private static readonly AmiiboJsonSerializerContext _serializerContext = AmiiboJsonSerializerContext.Default; @@ -137,7 +137,7 @@ public static byte[] GetApplicationArea(string amiiboId) if (ApplicationBytes.Length > 0) { byte[] bytes = ApplicationBytes; - ApplicationBytes = new byte[0]; + ApplicationBytes = Array.Empty(); return bytes; } VirtualAmiiboFile virtualAmiiboFile = LoadAmiiboFile(amiiboId);