From 2737c26b6b88568ee9ccd88f63d4cdded9723aca Mon Sep 17 00:00:00 2001 From: Pixel Date: Mon, 21 Jun 2010 15:14:15 -0700 Subject: Fixing a few bugs: zlib_deflate was mischecking its arguments, and HandleLua::write was mispushing its buffer as a boolean... --- lib/LuaHandle.cc | 4 ++-- 1 file 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(buf)); // wargl... L->push((lua_Number) count); L->call(3, 1); -- cgit v1.2.3