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
aaef4c3d
Commit
aaef4c3d
authored
Sep 22, 2020
by
philip
Committed by
Marcel Stör
Nov 07, 2020
Browse files
Make it work for the integer lua51 build
parent
bae01c47
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/sjson.c
View file @
aaef4c3d
...
...
@@ -726,7 +726,7 @@ static void encode_lua_object(lua_State *L, ENC_DATA *data, int argno, const cha
#if LUA_VERSION_NUM == 501
#ifdef LUA_NUMBER_INTEGRAL
snprintf
(
value
,
sizeof
(
value
),
LUA_INTEGER_FMT
,
lua_tointeger
(
L
,
-
1
));
snprintf
(
value
,
sizeof
(
value
),
"%d"
,
lua_tointeger
(
L
,
-
1
));
#else
snprintf
(
value
,
sizeof
(
value
),
SJSON_FLOAT_FMT
,
lua_tonumber
(
L
,
-
1
));
#endif
...
...
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