fixed seg.fault in uulib-decoder on files in UU-format

This commit is contained in:
Andrey Prygunkov
2008-02-13 23:27:12 +00:00
parent 9137ed6278
commit 7f45bb22f5

View File

@@ -152,7 +152,7 @@ Decoder::EStatus UULibDecoder::Execute()
}
else
{
//f**k, multiple attachments!? Can't handle this.
// multiple attachments!? Can't handle this.
attachment = NULL;
break;
}
@@ -162,7 +162,7 @@ Decoder::EStatus UULibDecoder::Execute()
if (attachment)
{
// okay, we got only one attachment, perfect!
if ((attachment->haveparts) && (attachment->haveparts[0])) // && (!attachment->haveparts[1])) FUCK UULIB
if ((attachment->haveparts) && (attachment->haveparts[0])) // && (!attachment->haveparts[1]))
{
int r = UUDecodeFile(attachment, (char*)m_szDestFilename);
@@ -170,7 +170,10 @@ Decoder::EStatus UULibDecoder::Execute()
{
// we did it!
res = eFinished;
m_szArticleFilename = strdup(attachment->filename);
if (attachment->filename)
{
m_szArticleFilename = strdup(attachment->filename);
}
}
}
else