From a9fc674b3971ec9f20c719f5e8c6b3dfed8c4961 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Wed, 2 Sep 2015 21:04:37 +0000 Subject: YAMN: - many small fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@15160 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/YAMN/src/mails/decode.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'plugins/YAMN/src/mails/decode.cpp') diff --git a/plugins/YAMN/src/mails/decode.cpp b/plugins/YAMN/src/mails/decode.cpp index 8f8099e776..d5c49e7ebe 100644 --- a/plugins/YAMN/src/mails/decode.cpp +++ b/plugins/YAMN/src/mails/decode.cpp @@ -443,7 +443,6 @@ void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode) { char *start=stream,*finder,*finderend; char Encoding=0; - char *DecodedResult=NULL; if (stream==NULL) return; @@ -477,8 +476,8 @@ void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode) cp=CP_ACP; if (Encoding != 0) { - int size,codeend; - char *pcodeend; + int size = 0,codeend; + char *pcodeend = 0; finder=finderend+2; if (CODED(finder)) @@ -508,9 +507,8 @@ void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode) size=finderend-finder+1+1; break; } - if (DecodedResult != NULL) - delete[] DecodedResult; - DecodedResult=new char[size+1]; + + char *DecodedResult = new char[size+1]; switch(Encoding) { case 'q': @@ -540,7 +538,7 @@ void ConvertCodedStringToUnicode(char *stream,WCHAR **storeto,DWORD cp,int mode) } delete oneWord; oneWord = 0; - delete[] DecodedResult; DecodedResult = 0; + delete[] DecodedResult; start = finderend; } else if (!EOS(start)) start++; } else if (!EOS(start)) start++; -- cgit v1.2.3