Unverified Commit c000a089 authored by Philip Gladstone's avatar Philip Gladstone Committed by GitHub
Browse files

Fix problem reading files a multiple of 128 bytes long (#3280)

parent 64bbf006
...@@ -442,6 +442,9 @@ static int file_g_read( lua_State* L, int n, int16_t end_char, int fd ) ...@@ -442,6 +442,9 @@ static int file_g_read( lua_State* L, int n, int16_t end_char, int fd )
int nread = vfs_read(fd, p, nwanted); int nread = vfs_read(fd, p, nwanted);
if (nread == VFS_RES_ERR || nread == 0) { if (nread == VFS_RES_ERR || nread == 0) {
if (j > 0) {
break;
}
lua_pushnil(L); lua_pushnil(L);
return 1; return 1;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment