Return empty array instead of NULL on error (to appease ppl who can't be bothered to check)

This commit is contained in:
Michael Becker 2019-08-16 01:08:21 -04:00
parent 7e2e98ce35
commit 31bd12781f

View File

@ -125,14 +125,15 @@ namespace UniversalEditor.ObjectModels.FileSystem
}
Console.WriteLine("DataRequest: " + mvarName + ": No source associated with this file");
return null;
return new byte[0];
}
public byte[] GetData(long offset, long length)
{
if (mvarSource != null) return mvarSource.GetData(offset, length);
Console.WriteLine("DataRequest: " + mvarName + ": No source associated with this file");
return null;
return new byte[length];
}
private System.IO.Stream mvarStream = null;