Skip to content

Commit

Permalink
Log errors other than dest too small
Browse files Browse the repository at this point in the history
  • Loading branch information
Genwald committed Dec 22, 2019
1 parent 38c500c commit 4125395
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions source/mod_installer.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ void compressFile(const char* path, u64 compSize, u64 &dataSize, char* &outBuff)
do {
setZSTDCustomLvl(compContext, compLvl++);
dataSize = ZSTD_compress2(compContext, outBuff, bufSize, inBuff, inSize);
if(ZSTD_isError(dataSize) && dataSize != 0xffffffffffffffba)
log("%s Error at lvl %d: %lx %s\n", path, compLvl, dataSize, ZSTD_getErrorName(dataSize));
if(!ZSTD_isError(dataSize) && dataSize > compSize) {
debug_log("Compressed \"%s\" to %lu bytes, %lu bytes away from goal, at level %d.\n", path, dataSize, dataSize - compSize, compLvl-1);
if(dataSize - compSize < bytesAway)
Expand Down

0 comments on commit 4125395

Please sign in to comment.