Update of /cvsroot/mahogany/M/src/modules/viewflt
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6392/src/modules/viewflt
Modified Files:
UUDecode.cpp
Log Message:
fixed parsing of uuencoded attachments at the start of message
Index: UUDecode.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/modules/viewflt/UUDecode.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -b -u -2 -r1.15 -r1.16
--- UUDecode.cpp 14 Jul 2004 16:05:44 -0000 1.15
+++ UUDecode.cpp 20 Jul 2004 14:02:00 -0000 1.16
@@ -60,5 +60,5 @@
// all UUencoded data start with a line whose prefix is "begin" and preceded by
// a blank line
-#define UU_BEGIN_PREFIX _T("\r\nbegin ")
+#define UU_BEGIN_PREFIX _T("begin ")
// UUencoded data ends at a line consisting solely of "end"
@@ -197,5 +197,16 @@
while ( *start )
{
- if ( wxStrncmp(start, UU_BEGIN_PREFIX, lenBegin) != 0 )
+ bool hasBegin = wxStrncmp(start, UU_BEGIN_PREFIX, lenBegin) == 0;
+ if ( hasBegin )
+ {
+ // check that we're either at the start of the text or after a blank
+ // line
+ if ( start >= text.c_str() + 2 )
+ {
+ hasBegin = start[-1] == _T('\n') && start[-2] == _T('\r');
+ }
+ }
+
+ if ( !hasBegin )
{
// try the next line (but only if not already at the end)
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates