kripken/emscripten — pull request #1412 by michaeljbishop (2013-07-18 19:00:32+00:00)
Title: Fixes in pread()

The bug occurs when pread() doesn't return 0 when asked to read an
offset beyond its buffer.

This behavior is explicitly documented at:
http://pubs.opengroup.org/onlinepubs/000095399/functions/read.html

> If the starting position is at or after the end-of-file, 0
> shall be returned