summaryrefslogtreecommitdiff
path: root/lib/LuaHandle.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/LuaHandle.cc')
-rw-r--r--lib/LuaHandle.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/LuaHandle.cc b/lib/LuaHandle.cc
index 472f3d6..ec1f573 100644
--- a/lib/LuaHandle.cc
+++ b/lib/LuaHandle.cc
@@ -610,16 +610,17 @@ int sLuaHandle::ucl_decompress(lua_State * __L) {
Lua * L = Lua::find(__L);
int n = L->gettop();
Handle * s, * d;
- int r;
+ int r, l;
- if (n != 2) {
+ if ((n != 3) || (!L->isnumber(3))) {
L->error("Incorrect arguments to method `Handle::ucl_decompress'");
}
s = L->recast<Handle>(1);
d = L->recast<Handle>(2);
+ l = L->tonumber(3);
- r = Handle::ucl_decompress(s, d);
+ r = Handle::ucl_decompress(s, d, l);
L->push((lua_Number) r);