kripken/emscripten — pull request #945 by ting-yuan (2013-03-12 04:31:54+00:00)
Title: Fix the return value of fgets().

It's a bug that occurs in every files ending with a newline. When encountering EOF, which is not discovered in previous runs, and there's no data available, it should return 0 to signal the EOF.