Replace `null` array w/ empty in `NESSyncSettings.OkBtn_Click` (fixes #3858)

fixes 103fb3832
This commit is contained in:
James Groom 2024-02-06 09:03:16 +10:00 committed by GitHub
parent 103fb38322
commit 33a71cf0e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -64,13 +64,13 @@ namespace BizHawk.Client.EmuHawk
private void OkBtn_Click(object sender, EventArgs e)
{
static byte[]/*?*/ ParseInitRAMPattern(string/*?*/ ss)
static byte[] ParseInitRAMPattern(string/*?*/ ss)
{
if (string.IsNullOrWhiteSpace(ss)) return null;
if (string.IsNullOrWhiteSpace(ss)) return Array.Empty<byte>();
if (!ss.All(NumericStringExtensions.IsHex))
{
//TODO warn
return null;
return Array.Empty<byte>();
}
var s = ss.AsSpan();
var a = new byte[(s.Length + 1) / 2];