Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '7zip/Common/OutBuffer.cpp')
-rwxr-xr-x7zip/Common/OutBuffer.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/7zip/Common/OutBuffer.cpp b/7zip/Common/OutBuffer.cpp
index f4ec1a30..a73fa7c5 100755
--- a/7zip/Common/OutBuffer.cpp
+++ b/7zip/Common/OutBuffer.cpp
@@ -57,8 +57,7 @@ HRESULT COutBuffer::FlushPart()
UInt32 size = (_streamPos >= _pos) ? (_bufferSize - _streamPos) : (_pos - _streamPos);
HRESULT result = S_OK;
#ifdef _NO_EXCEPTIONS
- if (ErrorCode != S_OK)
- result = ErrorCode;
+ result = ErrorCode;
#endif
if (_buffer2 != 0)
{
@@ -68,7 +67,7 @@ HRESULT COutBuffer::FlushPart()
if (_stream != 0
#ifdef _NO_EXCEPTIONS
- && (ErrorCode != S_OK)
+ && (ErrorCode == S_OK)
#endif
)
{