PeRunner: Ignore writev iovecs with base == NULL. This seems to be what linux does and musl expects on fflush(). Fixes some saveram related stuff in sameboy

This commit is contained in:
nattthebear 2017-07-25 17:02:59 -04:00
parent 04b605005b
commit 06a369dbe2
1 changed files with 4 additions and 1 deletions

View File

@ -507,7 +507,10 @@ namespace BizHawk.Emulation.Cores.Waterbox
{
long ret = 0;
for (int i = 0; i < iovcnt; i++)
ret += Write(fd, iov[i].Base, iov[i].Length);
{
if (iov[i].Base != IntPtr.Zero)
ret += Write(fd, iov[i].Base, iov[i].Length);
}
return ret;
}