From 602dec0c4c82bd1abb101a773dfb845c8a1beb43 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sat, 20 Jun 2020 19:59:48 -0400 Subject: [PATCH] clarify that CloneSaveRam() can return null --- src/BizHawk.Emulation.Common/Interfaces/Services/ISaveRam.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/BizHawk.Emulation.Common/Interfaces/Services/ISaveRam.cs b/src/BizHawk.Emulation.Common/Interfaces/Services/ISaveRam.cs index 0415e61bd5..f0cab3f1fb 100644 --- a/src/BizHawk.Emulation.Common/Interfaces/Services/ISaveRam.cs +++ b/src/BizHawk.Emulation.Common/Interfaces/Services/ISaveRam.cs @@ -10,7 +10,9 @@ { /// /// Returns a copy of the SaveRAM. Editing it won't do you any good unless you later call StoreSaveRam() - /// TODO: Prescribe whether this is allowed to return null in case there is no SaveRAM + /// This IS allowed to return null. + /// Unfortunately, the core may think differently of a nonexisting (null) saveram vs a 0 size saveram. + /// Frontend users of the ISaveRam should treat null as nonexisting (and thus not even write the file, so that the "does not exist" condition can be roundtripped and not confused with an empty file) /// byte[] CloneSaveRam();