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
a1be293f
Commit
a1be293f
authored
Mar 15, 2015
by
zeroday
Browse files
Merge pull request #279 from Erant/master
Fix getFSF to abide by the function contract, Thanks @Erant
parents
a8166228
0a404976
Changes
1
Show whitespace changes
Inline
Side-by-side
app/lua/lauxlib.c
View file @
a1be293f
...
...
@@ -659,13 +659,19 @@ typedef struct LoadFSF {
static
const
char
*
getFSF
(
lua_State
*
L
,
void
*
ud
,
size_t
*
size
)
{
LoadFSF
*
lf
=
(
LoadFSF
*
)
ud
;
(
void
)
L
;
if
(
L
==
NULL
&&
size
==
NULL
)
// Direct mode check
return
NULL
;
if
(
lf
->
extraline
)
{
lf
->
extraline
=
0
;
*
size
=
1
;
return
"
\n
"
;
}
if
(
fs_eof
(
lf
->
f
))
return
NULL
;
*
size
=
fs_read
(
lf
->
f
,
lf
->
buff
,
sizeof
(
lf
->
buff
));
return
(
*
size
>
0
)
?
lf
->
buff
:
NULL
;
}
...
...
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