Skip to content

Commit

Permalink
Fixing bug in file.readline when line length exceeds 128 chars
Browse files Browse the repository at this point in the history
  • Loading branch information
vsky279 authored and nwf committed Sep 29, 2020
1 parent 8124341 commit ebfce4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/modules/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ static int file_g_read( lua_State* L, int n, int16_t end_char, int fd )
for (i = 0; i < nread; ++i) {
luaL_addchar(&b, p[i]);
if (p[i] == end_char) {
vfs_lseek(fd, -nread + j + i + 1, VFS_SEEK_CUR); //reposition after end char found
vfs_lseek(fd, -nread + i + 1, VFS_SEEK_CUR); //reposition after end char found
nread = 0; // force break on outer loop
break;
}
Expand Down

0 comments on commit ebfce4a

Please sign in to comment.