From 9b8ddda191d7939ec684b44991d27fbe6e262954 Mon Sep 17 00:00:00 2001 From: Josef Eklann Date: Wed, 10 Feb 2016 14:56:05 +0100 Subject: [PATCH] Fixed bug triggered by incomplete rar file. --- SharpCompress/Utility.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SharpCompress/Utility.cs b/SharpCompress/Utility.cs index d6599187..0417c654 100644 --- a/SharpCompress/Utility.cs +++ b/SharpCompress/Utility.cs @@ -146,7 +146,7 @@ namespace SharpCompress readCount = (int)advanceAmount; } read = source.Read(buffer, 0, readCount); - if (read < 0) + if (read == 0) { break; }