Skip to content

Commit c000a08

Browse files
authored
Fix problem reading files a multiple of 128 bytes long (#3280)
1 parent 64bbf00 commit c000a08

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/modules/file.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,9 @@ static int file_g_read( lua_State* L, int n, int16_t end_char, int fd )
442442
int nread = vfs_read(fd, p, nwanted);
443443

444444
if (nread == VFS_RES_ERR || nread == 0) {
445+
if (j > 0) {
446+
break;
447+
}
445448
lua_pushnil(L);
446449
return 1;
447450
}

0 commit comments

Comments
 (0)