Commit 20629386 authored by devsaurus's avatar devsaurus
Browse files

fix parameter access for ucg.getStrWidth()

parent 0069f002
...@@ -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;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment