From 9dde5cd0b04791f25fe4351e4446d158904c6c3d Mon Sep 17 00:00:00 2001 From: Andrey Prygunkov Date: Mon, 26 Jan 2009 22:14:50 +0000 Subject: [PATCH] Improved compatibility of yenc-decoder --- Decoder.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Decoder.cpp b/Decoder.cpp index 341b724b..31d02d47 100644 --- a/Decoder.cpp +++ b/Decoder.cpp @@ -141,7 +141,7 @@ void YDecoder::Clear() m_lExpectedCRC = 0; m_lCalculatedCRC = 0xFFFFFFFF; m_iBegin = 0; - m_iEnd = 0; + m_iEnd = 0xFFFFFFFF; m_iSize = 0; m_iEndSize = 0; m_bAutoSeek = false; @@ -319,7 +319,7 @@ bool YDecoder::Write(char* buffer, int len, FILE* outfile) { if (m_bNeedSetPos) { - if (m_iBegin == 0 || m_iEnd == 0 || !outfile) + if (m_iBegin == 0 || m_iEnd == 0xFFFFFFFF || !outfile) { return false; }