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
Lua Json
Commits
2a6d96c8
Commit
2a6d96c8
authored
May 11, 2019
by
seny
Browse files
Remove unnecessary cast
parent
f17039c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/json-encode.c
View file @
2a6d96c8
...
@@ -194,7 +194,7 @@ static int encodeValue(lua_State *L, Box *box, int idx, const char *ev, int ridx
...
@@ -194,7 +194,7 @@ static int encodeValue(lua_State *L, Box *box, int idx, const char *ev, int ridx
lua_rawset
(
L
,
ridx
);
lua_rawset
(
L
,
ridx
);
lua_getfield
(
L
,
idx
,
"__array"
);
lua_getfield
(
L
,
idx
,
"__array"
);
if
(
lua_toboolean
(
L
,
-
1
))
{
if
(
lua_toboolean
(
L
,
-
1
))
{
if
(
!
isInteger
(
L
,
-
1
,
&
len
))
len
=
(
lua_Integer
)
lua_rawlen
(
L
,
idx
);
if
(
!
isInteger
(
L
,
-
1
,
&
len
))
len
=
lua_rawlen
(
L
,
idx
);
if
(
len
<
0
)
len
=
0
;
if
(
len
<
0
)
len
=
0
;
}
}
lua_settop
(
L
,
top
);
lua_settop
(
L
,
top
);
...
...
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