We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 13a1d46 + 569baad commit f1077b6Copy full SHA for f1077b6
1 file changed
include/xtensor-io/xnpz.hpp
@@ -303,8 +303,11 @@ namespace xt
303
}
304
else
305
{
306
- stream.seekg(static_cast<std::streamsize>(entry.compressed_size),
307
- std::ios_base::cur);
+ auto compressed_size = extract_zip64_compressed_size(stream, entry);
+ if (!stream.seekg(std::streamoff(compressed_size), std::ios_base::cur))
308
+ {
309
+ throw std::runtime_error("load_npz: unable to skip the next variable.");
310
+ }
311
312
313
throw std::runtime_error("Array "s + search_varname + " not found in file: "s + filename);
0 commit comments