summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-03-10 22:36:23 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2003-03-10 22:36:23 +0000
commit8789035e7447c7e9da54629baef7c66b04262467 (patch)
tree25eb89bb78d91d414141f0ca29bf3f77fe153b9d
parent85b77f5560b435cc0fe85eea5831b11f30e8f3e9 (diff)
downloadcryptopp-c50-fixes.tar.gz
workaround std::string problem in MacOS Xc50-fixes
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/branches/c50-fixes/c5@36 57ff6487-cd31-0410-9ec3-f628ee90f5f0
-rw-r--r--filters.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/filters.h b/filters.h
index 1b8965b..eb119b2 100644
--- a/filters.h
+++ b/filters.h
@@ -493,7 +493,8 @@ public:
{if (!parameters.GetValue("OutputStringPointer", m_output)) throw InvalidArgument("StringSink: OutputStringPointer not specified");}
unsigned int Put2(const byte *begin, unsigned int length, int messageEnd, bool blocking)
{
- m_output->append((const char_type *)begin, (const char_type *)begin+length);
+ if (length > 0)
+ m_output->append((const char_type *)begin, (const char_type *)begin+length);
return 0;
}