From 7505e88db66798b2b8fcdff2d92a7136cd826b5b Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 9 Sep 2010 02:26:30 +0200 Subject: Upgrading to IUP 3.2 - and cleaning up. --- iup/srclua5/il_getcolor.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'iup/srclua5/il_getcolor.c') diff --git a/iup/srclua5/il_getcolor.c b/iup/srclua5/il_getcolor.c index 4d6cf71..e62e977 100755 --- a/iup/srclua5/il_getcolor.c +++ b/iup/srclua5/il_getcolor.c @@ -18,17 +18,17 @@ static int GetColor(lua_State *L) { - int x = (int)luaL_checknumber(L,1); - int y = (int)luaL_checknumber(L,2); + int x = luaL_checkinteger(L,1); + int y = luaL_checkinteger(L,2); unsigned char r = (unsigned char) luaL_optnumber(L,3,0); unsigned char g = (unsigned char) luaL_optnumber(L,4,0); unsigned char b = (unsigned char) luaL_optnumber(L,5,0); int ret = IupGetColor(x,y,&r,&g,&b); if (ret) { - lua_pushnumber(L, (int) r); - lua_pushnumber(L, (int) g); - lua_pushnumber(L, (int) b); + lua_pushinteger(L, r); + lua_pushinteger(L, g); + lua_pushinteger(L, b); return 3; } else -- cgit v1.2.3