diff --git a/lang/c/src/vpkppc/PackFile.cpp b/lang/c/src/vpkppc/PackFile.cpp index db6ff8460..032001b26 100644 --- a/lang/c/src/vpkppc/PackFile.cpp +++ b/lang/c/src/vpkppc/PackFile.cpp @@ -277,7 +277,7 @@ SOURCEPP_API void vpkpp_run_for_all_entries(vpkpp_pack_file_handle_t handle, Ent SOURCEPP_EARLY_RETURN(handle); SOURCEPP_EARLY_RETURN(operation); - return const_cast(Convert::packFile(handle))->runForAllEntries([operation](const std::string& path, const Entry& entry) { + return Convert::packFile(handle)->runForAllEntries([operation](const std::string& path, const Entry& entry) { return operation(path.c_str(), const_cast(&entry)); }, includeUnbaked); }