[SystemService] Write notice skip flag as byte (#346)

The Gen5 caller supplies a one-byte flag. Preserve pointer and memory-fault behavior while writing only that byte, and cover a seeded guest-memory boundary that rejects the former four-byte write.
This commit is contained in:
Peter Bonanni
2026-07-17 19:41:38 -04:00
committed by GitHub
parent bcb0ebd991
commit 3c500d2cf0
2 changed files with 31 additions and 2 deletions
@@ -38,8 +38,8 @@ public static class SystemServiceExports
}
// No system notice screen to skip in the emulator; report "do not skip".
Span<byte> flagBytes = stackalloc byte[sizeof(int)];
BinaryPrimitives.WriteInt32LittleEndian(flagBytes, 0);
Span<byte> flagBytes = stackalloc byte[1];
flagBytes[0] = 0;
return ctx.Memory.TryWrite(flagAddress, flagBytes)
? ctx.SetReturn(0)
: ctx.SetReturn((int)OrbisGen2Result.ORBIS_GEN2_ERROR_MEMORY_FAULT);