aboutsummaryrefslogtreecommitdiff
path: root/src/library.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-06-04 15:46:59 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-06-04 15:46:59 -0700
commit98ba79568b89306ab1670382b432dd6f69e64615 (patch)
treed8ad2e5a0387737a6ac013515adf3831dac0df53 /src/library.js
parent9645ed34f1003f03970ba3c49a82a3c550a07bac (diff)
parent9226578fa142134973e3ad5544c22cb954ea0cc2 (diff)
Merge branch 'master' of github.com:feeley/emscripten into incoming
Diffstat (limited to 'src/library.js')
-rw-r--r--src/library.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/library.js b/src/library.js
index 07368ee7..ab27ed35 100644
--- a/src/library.js
+++ b/src/library.js
@@ -1834,6 +1834,10 @@ LibraryManager.library = {
___setErrNo(ERRNO_CODES.EIO);
return -1;
}
+ if (result === undefined && bytesRead === 0) {
+ ___setErrNo(ERRNO_CODES.EAGAIN);
+ return -1;
+ }
if (result === null || result === undefined) break;
bytesRead++;
{{{ makeSetValue('buf', 'i', 'result', 'i8') }}}