Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
20629386
Commit
20629386
authored
Dec 28, 2015
by
devsaurus
Browse files
fix parameter access for ucg.getStrWidth()
parent
0069f002
Changes
1
Hide whitespace changes
Inline
Side-by-side
app/modules/ucg.c
View file @
20629386
...
@@ -402,7 +402,7 @@ static int lucg_getHeight( lua_State *L )
...
@@ -402,7 +402,7 @@ static int lucg_getHeight( lua_State *L )
return
1
;
return
1
;
}
}
// Lua: width = ucg.getStrWidth( self )
// Lua: width = ucg.getStrWidth( self
, string
)
static
int
lucg_getStrWidth
(
lua_State
*
L
)
static
int
lucg_getStrWidth
(
lua_State
*
L
)
{
{
lucg_userdata_t
*
lud
;
lucg_userdata_t
*
lud
;
...
@@ -410,7 +410,7 @@ static int lucg_getStrWidth( lua_State *L )
...
@@ -410,7 +410,7 @@ static int lucg_getStrWidth( lua_State *L )
if
((
lud
=
get_lud
(
L
))
==
NULL
)
if
((
lud
=
get_lud
(
L
))
==
NULL
)
return
0
;
return
0
;
const
char
*
s
=
luaL_checkstring
(
L
,
(
1
+
3
)
+
1
);
const
char
*
s
=
luaL_checkstring
(
L
,
2
);
if
(
s
==
NULL
)
if
(
s
==
NULL
)
return
0
;
return
0
;
...
...
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