Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lua-zip-git-1.rockspec
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ external_dependencies = {
library = "zip",
}
}

build = {
type = "builtin",
modules = {
Expand All @@ -35,6 +36,9 @@ build = {
libdirs = { "$(ZIP_LIBDIR)" },
libraries = { "zip" },
}
}
},
platforms = { windows = { modules = { ["brimworks.zip"] = {
libraries = { "zip", "advapi32", "kernel32", "user32" },
defines = { "ZIP_STATIC" },
}}}},
}

4 changes: 2 additions & 2 deletions lua_zip.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,10 @@ static struct zip** check_archive(lua_State* L, int narg) {
* just return 0.
*/
static int S_push_error(lua_State* L, int zip_error, int sys_error) {
char buff[1024];
char buff[1024]; int len;
if ( 0 == zip_error ) return 0;

int len = zip_error_to_str(buff, sizeof(buff), zip_error, sys_error);
len = zip_error_to_str(buff, sizeof(buff), zip_error, sys_error);
if ( len >= sizeof(buff) ) len = sizeof(buff)-1;
lua_pushlstring(L, buff, len);

Expand Down