summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2009-12-01 09:22:31 +0100
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2009-12-01 09:30:42 +0100
commitd72f9e9e236cb35faf6ee22527fa9bf6508e46dc (patch)
tree210b96034760cd5be1fc447bcd263d4466bacb68 /lib
parent935d1dbc7dd8357619b2a6892d017c511a7ef57a (diff)
Whoops... was removing a biiiit too much off the stack.
Diffstat (limited to 'lib')
-rw-r--r--lib/BLua.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/BLua.cc b/lib/BLua.cc
index 8f9f59d..175f420 100644
--- a/lib/BLua.cc
+++ b/lib/BLua.cc
@@ -565,7 +565,7 @@ void Lua::open_base() {
push("sleep");
push(LuaStatics::sleep);
settable();
- for (remove(n); n <= gettop(); remove(n));
+ while (n < gettop()) remove(n);
push("mkdir");
push(LuaStatics::mkdir);
settable(LUA_GLOBALSINDEX);
@@ -589,13 +589,13 @@ void Lua::open_base() {
void Lua::open_table() {
int n = gettop();
luaopen_table(L);
- for (remove(n); n <= gettop(); remove(n));
+ while (n < gettop()) remove(n);
}
void Lua::open_io(bool safe) {
int n = gettop();
luaopen_io(L);
- for (remove(n); n <= gettop(); remove(n));
+ while (n < gettop()) remove(n);
}
void Lua::open_string() {
@@ -604,19 +604,19 @@ void Lua::open_string() {
push("iconv");
push(LuaStatics::iconv);
settable();
- for (remove(n); n <= gettop(); remove(n));
+ while (n < gettop()) remove(n);
}
void Lua::open_math() {
int n = gettop();
luaopen_math(L);
- for (remove(n); n <= gettop(); remove(n));
+ while (n < gettop()) remove(n);
}
void Lua::open_debug() {
int n = gettop();
luaopen_debug(L);
- for (remove(n); n <= gettop(); remove(n));
+ while (n < gettop()) remove(n);
}
extern "C" {
@@ -626,19 +626,19 @@ LUALIB_API int (luaopen_dir) (lua_State *L);
void Lua::open_dir() {
int n = gettop();
luaopen_dir(L);
- for (remove(n); n <= gettop(); remove(n));
+ while (n < gettop()) remove(n);
}
void Lua::open_jit() {
int n = gettop();
luaopen_jit(L);
- for (remove(n); n <= gettop(); remove(n));
+ while (n < gettop()) remove(n);
}
void Lua::open_bit() {
int n = gettop();
luaopen_bit(L);
- for (remove(n); n <= gettop(); remove(n));
+ while (n < gettop()) remove(n);
}
void Lua::declarefunc(const String & name, lua_CFunction f, int i) {