diff --git a/src/textfile_gui.cpp b/src/textfile_gui.cpp index 9a5478c090..ea46486cc7 100644 --- a/src/textfile_gui.cpp +++ b/src/textfile_gui.cpp @@ -679,7 +679,7 @@ static std::vector Gunzip(std::span input) * inflate is out of output space - allocate more */ z.avail_out += BLOCKSIZE; output.resize(output.size() + BLOCKSIZE); - z.next_out = reinterpret_cast(&*output.end() - z.avail_out); + z.next_out = reinterpret_cast(output.data() + output.size() - z.avail_out); res = inflate(&z, Z_FINISH); } @@ -717,7 +717,7 @@ static std::vector Xunzip(std::span input) * inflate is out of output space - allocate more */ z.avail_out += BLOCKSIZE; output.resize(output.size() + BLOCKSIZE); - z.next_out = reinterpret_cast(&*output.end() - z.avail_out); + z.next_out = reinterpret_cast(output.data() + output.size() - z.avail_out); res = lzma_code(&z, LZMA_FINISH); }