Skip to content

Commit

Permalink
don't check compression level with luaL_argcheck
Browse files Browse the repository at this point in the history
It is checked by UCL itself.

> ucl.compress('text', 11)
lua:1: UCL error occurred: UCL_E_INVALID_ARGUMENT
  • Loading branch information
starius committed Nov 8, 2015
1 parent 5b85193 commit b4501f2
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/lua-ucl/lua-ucl.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,6 @@ int luaucl_compress(lua_State* L) {
level = 7;
}
}
luaL_argcheck(L, level >= 1, 2, "level must be >= 1");
luaL_argcheck(L, level <= 10, 2, "level must be <= 10");
// see UCL's README
ucl_uint output_len = input_len + (input_len / 8) + 256;
void* output = lua_newuserdata(L, output_len);
Expand Down

0 comments on commit b4501f2

Please sign in to comment.