summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPixel <pixel@nobis-crew.org>2010-06-21 15:14:15 -0700
committerPixel <pixel@nobis-crew.org>2010-06-21 15:14:15 -0700
commit2737c26b6b88568ee9ccd88f63d4cdded9723aca (patch)
treeadaf0c3a3bf9492d135c88a86559770da4565a61 /lib
parentefe155f9419191ce36f96819a7fc4be61abc4feb (diff)
Fixing a few bugs: zlib_deflate was mischecking its arguments, and HandleLua::write was mispushing its buffer as a boolean...
Diffstat (limited to 'lib')
-rw-r--r--lib/LuaHandle.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/LuaHandle.cc b/lib/LuaHandle.cc
index c78b577..5b0d85e 100644
--- a/lib/LuaHandle.cc
+++ b/lib/LuaHandle.cc
@@ -832,7 +832,7 @@ int sLuaHandle::zlib_deflate(lua_State * __L) {
int level = Z_DEFAULT_COMPRESSION;
bool raw = false;
- if ((n < 2) || (n > 4) || ((n >= 3) && !L->isnumber()) || ((n == 4) && !L->isboolean())) {
+ if ((n < 2) || (n > 4) || ((n >= 3) && !L->isnumber(3)) || ((n == 4) && !L->isboolean(4))) {
L->error("Incorrect arguments to method `Handle::zlib_deflate'");
}
@@ -1513,7 +1513,7 @@ ssize_t HandleLua::write(const void * buf, size_t count) throw (GeneralException
}
L->insert(-2);
- L->push(buf);
+ L->push(const_cast<void *>(buf)); // wargl...
L->push((lua_Number) count);
L->call(3, 1);