Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/salinflt.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
// SPDX-FileCopyrightText: 2023 Open Salamander Authors
// SPDX-License-Identifier: GPL-2.0-or-later
// CommentsTranslationProject: TRANSLATED

#include "precomp.h"

#include "salinflt.h"

/* inflate.c -- modified by Lucas Cerman & Petr Solin
/* inflate.c -- modified by Lucas Čerman & Petr Solin
version 1.1, Feb 2007

based on file inflate.c distributed with infozip,
Expand Down Expand Up @@ -220,8 +221,8 @@ uch NextByte(CDecompressionObject* decompress)
else
{
if (decompress->DataPtr == decompress->DataEnd)
decompress->DataPtr++; // chybovy stav je az decompress->DataPtr > decompress->DataEnd
return 0 /* chyba */;
decompress->DataPtr++; // the error state occurs only when decompress->DataPtr > decompress->DataEnd
return 0 /* error */;
}
}
#endif
Expand Down Expand Up @@ -500,7 +501,7 @@ int inflate_stored(CDecompressionObject* decompress)
bytesLeft -= inBytes;
decompress->WinPos += inBytes;
outBytes -= inBytes;
if (!bytesLeft && outBytes) // je potreba delsi vstup, ten ale nemame (vse je v decompress->Data)
if (!bytesLeft && outBytes) // longer input is needed, but we do not have it (everything is in decompress->Data)
{
TRACE_I("inflate_stored: input error");
return 4;
Expand Down Expand Up @@ -1090,7 +1091,7 @@ int huft_free(CDecompressionObject* decompress, struct huft* t)

// *************************************************************************************
//
// metody pro Salamandera:
// methods for Salamander:
//
// *************************************************************************************

Expand All @@ -1112,5 +1113,5 @@ int CDecompressionObject::Flush(unsigned bytes)
}
}
Crc = UpdateCrc32(SlideWin, bytes, Crc);
return 0; // uspech
return 0; // success
}