aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjluehrs2 <jluehrs2@uiuc.edu>2007-09-07 19:37:00 -0500
committerjluehrs2 <jluehrs2@uiuc.edu>2007-09-07 19:37:00 -0500
commit7772b6d74da4513467af97c4f6d33088c55b3874 (patch)
tree248d9c0719ef3984f4f61fe0e5b7b7720e0e2c58
parentd9bd7a2b9bfe1d5266728c939d7040761c30de08 (diff)
downloadluancurses-7772b6d74da4513467af97c4f6d33088c55b3874.tar.gz
luancurses-7772b6d74da4513467af97c4f6d33088c55b3874.zip
actually return things here
-rw-r--r--src/curses.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/curses.c b/src/curses.c
index 95c4303..5be65d1 100644
--- a/src/curses.c
+++ b/src/curses.c
@@ -277,10 +277,10 @@ static int l_addstr(lua_State* L)
p = get_pos(L);
str = luaL_checklstring(L, 2, &l);
if (l == 1) {
- mvaddch(p.y, p.x, *str);
+ lua_pushboolean(L, mvaddch(p.y, p.x, *str) == OK);
}
else {
- mvaddstr(p.y, p.x, str);
+ lua_pushboolean(L, mvaddstr(p.y, p.x, str) == OK);
}
}
else {
@@ -289,10 +289,10 @@ static int l_addstr(lua_State* L)
str = luaL_checklstring(L, 1, &l);
if (l == 1) {
- addch(*str);
+ lua_pushboolean(L, addch(*str) == OK);
}
else {
- addstr(str);
+ lua_pushboolean(L, addstr(str) == OK);
}
}