diff options
| author | xolatile | 2025-08-10 00:19:46 +0200 |
|---|---|---|
| committer | xolatile | 2025-08-10 00:19:46 +0200 |
| commit | 757096e7df15c14b9b10352fa91663483f9e34f8 (patch) | |
| tree | dcad789d0abd8be76463277dc01bf32c4e6a527b /src/shared/zip.cpp | |
| parent | b2c89d7060e99a36c8c7ac897b7386686c74deac (diff) | |
| download | xolatile-badassbug-757096e7df15c14b9b10352fa91663483f9e34f8.tar.xz xolatile-badassbug-757096e7df15c14b9b10352fa91663483f9e34f8.tar.zst | |
all
Diffstat (limited to 'src/shared/zip.cpp')
| -rw-r--r-- | src/shared/zip.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/zip.cpp b/src/shared/zip.cpp index 98ac8fb..d3b7e21 100644 --- a/src/shared/zip.cpp +++ b/src/shared/zip.cpp @@ -88,7 +88,7 @@ static bool findzipdirectory(FILE *f, zipdirectoryheader &hdr) { return true; } -static bool readzipdirectory(const char *archname, FILE *f, int entries, int offset, uint size, vector<zipfile> &files) { +static bool readzipdirectory(FILE *f, int entries, int offset, uint size, vector<zipfile> &files) { uchar *buf = new (false) uchar[size], *src = buf; if(!buf || fseek(f, offset, SEEK_SET) < 0 || fread(buf, 1, size, f) != size) { delete[] buf; return false; } loopi(entries) { @@ -230,7 +230,7 @@ bool addzip(const char *name, const char *mount = NULL, const char *strip = NULL } zipdirectoryheader h; vector<zipfile> files; - if(!findzipdirectory(f, h) || !readzipdirectory(pname, f, h.entries, h.offset, h.size, files)) { + if(!findzipdirectory(f, h) || !readzipdirectory(f, h.entries, h.offset, h.size, files)) { conoutf(CON_ERROR, "could not read directory in zip %s", pname); fclose(f); return false; |
