starwing / lunzip

A Lua module that use minizip to read zip file

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

错误是-3

baidwwy opened this issue · comments

lunzip/lunzip.c

Lines 327 to 351 in 748f449

static int lunz_pusherror(lua_State *L, int err) {
lua_pushnil(L);
switch (err) {
case UNZ_ERRNO:
lua_pushstring(L, strerror(errno));
break;
case UNZ_EOF:
lua_pushliteral(L, "unexpected end of file");
break;
case UNZ_PARAMERROR:
lua_pushliteral(L, "parameter error");
break;
case UNZ_BADZIPFILE:
lua_pushliteral(L, "bad zip file");
break;
case UNZ_INTERNALERROR:
lua_pushliteral(L, "internal error");
break;
case UNZ_CRCERROR:
lua_pushliteral(L, "crc error");
break;
}
lua_pushinteger(L, err);
return 3;
}

密码错误时,错误是-3,这里应该加个default

修了,多谢~不过也许你可以看看我的 https://github.com/starwing/lua-miniz