am: Implement CreateHandleStorage and fixes (#1929)

This commit is contained in:
Ac_K 2021-01-19 03:28:35 +01:00 committed by GitHub
parent 5e1a839eaa
commit 1364f36161
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 49 additions and 11 deletions

View file

@ -24,6 +24,11 @@ namespace Ryujinx.HLE.HOS.Services.Am.AppletAE
// Write(u64, buffer<bytes, 0x21>)
public ResultCode Write(ServiceCtx context)
{
if (_storage.IsReadOnly)
{
return ResultCode.ObjectInvalid;
}
long writePosition = context.RequestData.ReadInt64();
if (writePosition > _storage.Data.Length)