diff options
author | scuri <scuri> | 2008-11-04 23:21:50 +0000 |
---|---|---|
committer | scuri <scuri> | 2008-11-04 23:21:50 +0000 |
commit | 65a02bfa93a714b1362989f90137d6604bc7bb3a (patch) | |
tree | f526cc2389d16b02a21a59bf3f32e605cee53148 | |
parent | 5b337b3c5aa0560b687be1661b857da532a9fbfc (diff) |
*** empty log message ***
-rw-r--r-- | html/en/history.html | 6 | ||||
-rw-r--r-- | src/lua5/cdlua5.c | 5 |
2 files changed, 9 insertions, 2 deletions
diff --git a/html/en/history.html b/html/en/history.html index e546520..16fab15 100644 --- a/html/en/history.html +++ b/html/en/history.html @@ -10,12 +10,14 @@ <body> <h1>History of Changes</h1> -<h3>CVS (22/Oct/2008)</h3> +<h3>CVS (04/Nov/2008)</h3> <ul> <li><span style="color: #FF0000">Fixed:</span> CDLua binding functions canvas:foreground, canvas:setforeground, canvas:background and canvas:setbackground. Color was being checked from the wrong position in the - stack. Reported and invalid color when being used.</li> + stack. They were reporting and invalid color when being used.</li> + <li><span style="color: #FF0000">Fixed:</span> CDLua binding functions + canvas:foreground and canvas:background when using cd.QUERY are value. </li> </ul> <h3>Version 5.1 (14/Oct/2008)</h3> <ul> diff --git a/src/lua5/cdlua5.c b/src/lua5/cdlua5.c index 9ee3d4e..db22422 100644 --- a/src/lua5/cdlua5.c +++ b/src/lua5/cdlua5.c @@ -285,7 +285,12 @@ void cdlua_pushchannel(lua_State* L, unsigned char* channel, int size) long cdlua_checkcolor(lua_State* L, int param) { if (!lua_islightuserdata(L, param)) + { + if (lua_isnumber(L, param) && (lua_tointeger(L, param) == CD_QUERY)) + return CD_QUERY; + luaL_argerror(L, param, "invalid color, must be a light user data"); + } return (long int)lua_touserdata(L, param); } |