mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-06-28 04:36:23 +02:00
Avoid zero-length array allocations (#427)
This commit is contained in:
parent
decd37ce6d
commit
5913ceda40
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