Fixed qMin

Signed-off-by: Trial97 <alexandru.tripon97@gmail.com>
This commit is contained in:
Trial97 2024-03-21 20:01:40 +02:00
parent 3046822272
commit a7029a9e53
No known key found for this signature in database
GPG Key ID: 55EF5DA53DB36318
2 changed files with 3 additions and 3 deletions

View File

@ -175,7 +175,7 @@ bool Tar::extract(QIODevice* in, QString dst)
qCritical() << "The expected blocksize was not respected when reading file"; qCritical() << "The expected blocksize was not respected when reading file";
return false; return false;
} }
tmp.truncate(qMin(BLOCKSIZE, size)); tmp.truncate(qMin(qint64(BLOCKSIZE), size));
out.write(tmp); out.write(tmp);
size -= BLOCKSIZE; size -= BLOCKSIZE;
} }

View File

@ -39,8 +39,8 @@
// both extract functions will extract the first folder inside dest(disregarding the prefix) // both extract functions will extract the first folder inside dest(disregarding the prefix)
namespace Tar { namespace Tar {
bool extract(QIODevice* in, QString dst); bool extract(QIODevice* in, QString dst);
}; }
namespace GZTar { namespace GZTar {
bool extract(QString src, QString dst); bool extract(QString src, QString dst);
}; }