summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorscuri <scuri>2008-10-22 20:00:21 +0000
committerscuri <scuri>2008-10-22 20:00:21 +0000
commita730ecc4340493f3e341c744617cdd58aa60b296 (patch)
tree4bf1d2745e4436957a773191dce166dcdc458dcd
parent4ef58b73dab6065c5b39a3f89ed2981f9a26a9d5 (diff)
*** empty log message ***
-rw-r--r--html/en/history.html7
-rw-r--r--src/lua5/cdlua5_canvas.c8
2 files changed, 11 insertions, 4 deletions
diff --git a/html/en/history.html b/html/en/history.html
index 542023f..e546520 100644
--- a/html/en/history.html
+++ b/html/en/history.html
@@ -10,6 +10,13 @@
<body>
<h1>History of Changes</h1>
+<h3>CVS (22/Oct/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>
+</ul>
<h3>Version 5.1 (14/Oct/2008)</h3>
<ul>
<li><span style="color: #0000FF">New:</span> CD_DEBUG driver.</li>
diff --git a/src/lua5/cdlua5_canvas.c b/src/lua5/cdlua5_canvas.c
index 8800123..4d38cbf 100644
--- a/src/lua5/cdlua5_canvas.c
+++ b/src/lua5/cdlua5_canvas.c
@@ -565,7 +565,7 @@ static int wdlua5_canvas2world(lua_State *L)
\***************************************************************************/
static int cdlua5_foreground(lua_State *L)
{
- long int color_i = cdlua_checkcolor(L, 1);
+ long int color_i = cdlua_checkcolor(L, 2);
color_i = cdCanvasForeground(cdlua_checkcanvas(L, 1), color_i);
lua_pushlightuserdata(L, (void*) color_i);
return 1;
@@ -573,7 +573,7 @@ static int cdlua5_foreground(lua_State *L)
static int cdlua5_setforeground(lua_State *L)
{
- long int color_i = cdlua_checkcolor(L, 1);
+ long int color_i = cdlua_checkcolor(L, 2);
cdCanvasSetForeground(cdlua_checkcanvas(L, 1), color_i);
return 0;
}
@@ -583,7 +583,7 @@ static int cdlua5_setforeground(lua_State *L)
\***************************************************************************/
static int cdlua5_background(lua_State *L)
{
- long int color_i = cdlua_checkcolor(L, 1);
+ long int color_i = cdlua_checkcolor(L, 2);
color_i = cdCanvasBackground(cdlua_checkcanvas(L, 1), color_i);
lua_pushlightuserdata(L, (void*) color_i);
return 1;
@@ -591,7 +591,7 @@ static int cdlua5_background(lua_State *L)
static int cdlua5_setbackground(lua_State *L)
{
- long int color_i = cdlua_checkcolor(L, 1);
+ long int color_i = cdlua_checkcolor(L, 2);
cdCanvasSetBackground(cdlua_checkcanvas(L, 1), color_i);
return 0;
}