From 1e4641389cb58a5dc518932712c1c50cfaaa62cb Mon Sep 17 00:00:00 2001 From: Byron Clark Date: Mon, 30 Jun 2008 19:30:09 +0200 Subject: [PATCH] progressbar: fix newindex Signed-off-by: Julien Danjou --- widgets/progressbar.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/widgets/progressbar.c b/widgets/progressbar.c index d03dcbeae..b3c44b202 100644 --- a/widgets/progressbar.c +++ b/widgets/progressbar.c @@ -583,28 +583,28 @@ luaA_progressbar_newindex(lua_State *L) switch(a_tokenize(attr, len)) { case A_TK_GAP: - d->gap = luaA_getopt_number(L, 2, "gap", d->gap); + d->gap = luaL_checknumber(L, 3); break; case A_TK_TICKS_COUNT: - d->ticks_count = luaA_getopt_number(L, 2, "ticks_count", d->ticks_count); + d->ticks_count = luaL_checknumber(L, 3); break; case A_TK_TICKS_GAP: - d->ticks_gap = luaA_getopt_number(L, 2, "ticks_gap", d->ticks_gap); + d->ticks_gap = luaL_checknumber(L, 3); break; case A_TK_BORDER_PADDING: - d->border_padding = luaA_getopt_number(L, 2, "border_padding", d->border_padding); + d->border_padding = luaL_checknumber(L, 3); break; case A_TK_BORDER_WIDTH: - d->border_width = luaA_getopt_number(L, 2, "border_width", d->border_width); + d->border_width = luaL_checknumber(L, 3); break; case A_TK_WIDTH: - d->width = luaA_getopt_number(L, 2, "width", d->width); + d->width = luaL_checknumber(L, 3); break; case A_TK_HEIGHT: - d->height = luaA_getopt_number(L, 2, "height", d->height); + d->height = luaL_checknumber(L, 3); break; case A_TK_VERTICAL: - d->vertical = luaA_getopt_boolean(L, 2, "vertical", d->vertical); + d->vertical = luaA_checkboolean(L, 3); break; default: return 0;