Skip to content

Commit

Permalink
Fix Licence Text && Fix while loop issue
Browse files Browse the repository at this point in the history
  • Loading branch information
xrkolovos committed Feb 22, 2021
1 parent d90b8ba commit e2e6021
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ OF THIRD PARTY RIGHTS
or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program; if not, see http://www.gnu.org/licenses or write tod
along with this program; if not, see http://www.gnu.org/licenses or write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA, 02110-1301 USA, or download the license from the following URL:
http://itextpdf.com/terms-of-use/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ protected internal static byte[] FlateDecodeInternal(byte[] @in, bool strict, Me
byte[] b = new byte[strict ? 4092 : 1];
try {
int n;
while ((n = zip.Read(b)) >= 0) {

This comment has been minimized.

Copy link
@Snipx

Snipx Feb 22, 2021

Contributor

Why do you think the loop is wrong?
The following extension method is in action here (see KernelExtensions):

    public static int Read(this Stream stream, byte[] buffer) {
        int size = stream.Read(buffer, 0, buffer.Length);
        return size == 0 ? -1 : size;
    }

This comment has been minimized.

Copy link
@Snipx

Snipx Feb 22, 2021

Contributor

If you have found a case which does not work properly then kindly add such a test into your PR.

while ((n = zip.Read(b)) > 0) {
@out.Write(b, 0, n);
}
zip.Dispose();
Expand Down

0 comments on commit e2e6021

Please sign in to comment.