Unverified Commit 994e8faa authored by Terry Ellison's avatar Terry Ellison Committed by GitHub
Browse files

Merge pull request #2383 from dnc40085/dev_file.read()_retval_fix

Fix for lack of nil return in file.read() when EOF is reached
parents 7a54ae06 cbcb1b1a
......@@ -432,7 +432,8 @@ static int file_g_read( lua_State* L, int n, int16_t end_char, int fd )
luaM_free(L, heap_mem);
heap_mem = NULL;
}
return 0;
lua_pushnil(L);
return 1;
}
vfs_lseek(fd, -(n - i), VFS_SEEK_CUR);
......
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