diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sim/syscall_emul.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sim/syscall_emul.cc b/src/sim/syscall_emul.cc index 392658c5a..e62a8686a 100644 --- a/src/sim/syscall_emul.cc +++ b/src/sim/syscall_emul.cc @@ -245,7 +245,7 @@ readFunc(SyscallDesc *desc, int num, LiveProcess *p, ThreadContext *tc) int bytes_read = read(sim_fd, bufArg.bufferPtr(), nbytes); - if (bytes_read != -1) + if (bytes_read > 0) bufArg.copyOut(tc->getMemProxy()); return bytes_read; |