mirror of
https://git.ryujinx.app/kenji-nx/ryujinx.git
synced 2025-12-19 04:37:09 +00:00
Avoid zero-length array allocations
This commit is contained in:
parent
c8af900b10
commit
55d88d08d4
2 changed files with 4 additions and 4 deletions
|
|
@ -341,7 +341,7 @@ namespace Ryujinx.HLE.HOS
|
|||
{
|
||||
if (VirtualAmiibo.ApplicationBytes.Length > 0)
|
||||
{
|
||||
VirtualAmiibo.ApplicationBytes = new byte[0];
|
||||
VirtualAmiibo.ApplicationBytes = Array.Empty<byte>();
|
||||
VirtualAmiibo.InputBin = string.Empty;
|
||||
}
|
||||
if (NfpDevices[nfpDeviceId].State == NfpDeviceState.SearchingForTag)
|
||||
|
|
@ -356,7 +356,7 @@ namespace Ryujinx.HLE.HOS
|
|||
VirtualAmiibo.InputBin = path;
|
||||
if (VirtualAmiibo.ApplicationBytes.Length > 0)
|
||||
{
|
||||
VirtualAmiibo.ApplicationBytes = new byte[0];
|
||||
VirtualAmiibo.ApplicationBytes = Array.Empty<byte>();
|
||||
}
|
||||
byte[] encryptedData = File.ReadAllBytes(path);
|
||||
VirtualAmiiboFile newFile = AmiiboBinReader.ReadBinFile(encryptedData);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue