Skip to content

Commit 3b2af26

Browse files
committed
libzip deprecated func fix
1 parent 7a11613 commit 3b2af26

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/cosim/utility/zip.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,9 @@ entry_index archive::find_entry(const std::string& name) const
151151
assert(is_open());
152152
const auto n = zip_name_locate(m_archive, name.c_str(), ZIP_FL_ENC_GUESS);
153153
if (n < 0) {
154-
int code = 0;
155-
zip_error_get(m_archive, &code, nullptr);
154+
int code;
155+
auto* err = zip_get_error(m_archive);
156+
code = zip_error_code_zip(err);
156157
if (code == ZIP_ER_NOENT)
157158
return invalid_entry_index;
158159
else

0 commit comments

Comments
 (0)