Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
ebfce4a9
Commit
ebfce4a9
authored
Sep 29, 2020
by
Lukáš Voborský
Committed by
Nathaniel Wesley Filardo
Sep 29, 2020
Browse files
Fixing bug in `file.readline` when line length exceeds 128 chars
parent
8124341a
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/file.c
View file @
ebfce4a9
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment