fix parameter access for ucg.getStrWidth()

This commit is contained in:
devsaurus 2015-12-28 15:22:09 +01:00
parent 0069f002a8
commit 20629386ca
1 changed files with 2 additions and 2 deletions

View File

@ -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 )
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;