fix sleek to return a value.

This commit is contained in:
Kelvin Sherlock 2013-02-16 00:11:12 -05:00
parent d2a0d95c35
commit d92ebe2634

View File

@ -494,7 +494,8 @@ namespace {
fprintf(stderr, " seek(%02x, %08x, %02x)\n", fd, offset, nativeWhence); fprintf(stderr, " seek(%02x, %08x, %02x)\n", fd, offset, nativeWhence);
if (::lseek(fd, offset, nativeWhence) < 0) off_t rv = ::lseek(fd, offset, nativeWhence);
if (rv < 0)
{ {
d0 = errno_to_errno(errno); d0 = errno_to_errno(errno);
f.error = 0; f.error = 0;
@ -505,6 +506,7 @@ namespace {
f.error = 0; f.error = 0;
} }
memoryWriteLong(rv, arg + 4);
memoryWriteWord(f.error, parm + 2); memoryWriteWord(f.error, parm + 2);
return d0; return d0;
} }