kripken/emscripten — pull request #1628 by michaeljbishop (2013-09-17 17:10:52+00:00)
Title: Fixes in pread()

This is a repeat of pull request https://github.com/kripken/emscripten/pull/1412 which was removed
in the File system refactor.

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