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
403c633b
Commit
403c633b
authored
Sep 22, 2020
by
philip
Committed by
Nathaniel Wesley Filardo
Sep 27, 2020
Browse files
Make it work for the integer lua51 build
parent
85298b34
Changes
1
Show whitespace changes
Inline
Side-by-side
app/modules/sjson.c
View file @
403c633b
...
@@ -726,7 +726,7 @@ static void encode_lua_object(lua_State *L, ENC_DATA *data, int argno, const cha
...
@@ -726,7 +726,7 @@ static void encode_lua_object(lua_State *L, ENC_DATA *data, int argno, const cha
#if LUA_VERSION_NUM == 501
#if LUA_VERSION_NUM == 501
#ifdef LUA_NUMBER_INTEGRAL
#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
#else
snprintf
(
value
,
sizeof
(
value
),
SJSON_FLOAT_FMT
,
lua_tonumber
(
L
,
-
1
));
snprintf
(
value
,
sizeof
(
value
),
SJSON_FLOAT_FMT
,
lua_tonumber
(
L
,
-
1
));
#endif
#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