Fix functional change in commit 905bfacf44

This commit is contained in:
Markus F.X.J. Oberhumer 2023-08-02 17:45:17 +02:00
parent 43b3b54197
commit 13e5c13695
1 changed files with 1 additions and 1 deletions

View File

@ -321,7 +321,7 @@ upx_off_t OutputFile::seek(upx_off_t off, int whence) {
void OutputFile::set_extent(upx_off_t offset, upx_off_t length) {
super::set_extent(offset, length);
bytes_written = 0;
if (0 == offset && ~(upx_off_t) 0 == length) {
if (0 == offset && 0xffffffffLL == length) {
if (::fstat(_fd, &st) != 0)
throwIOException(_name, errno);
_length = st.st_size - offset;