summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base64.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/base64.cpp b/base64.cpp
index 3cf48ab..2670155 100644
--- a/base64.cpp
+++ b/base64.cpp
@@ -13,6 +13,8 @@ void Base64Encoder::IsolatedInitialize(const NameValuePairs &parameters)
{
bool insertLineBreaks = parameters.GetValueWithDefault("InsertLineBreaks", true);
int maxLineLength = parameters.GetIntValueWithDefault("MaxLineLength", 72);
+
+ const char *lineBreak = insertLineBreaks ? "\n" : "";
m_filter->Initialize(CombinedNameValuePairs(
parameters,
@@ -20,8 +22,8 @@ void Base64Encoder::IsolatedInitialize(const NameValuePairs &parameters)
("PaddingByte", s_padding)
("Log2Base", 6)
("GroupSize", insertLineBreaks ? maxLineLength : 0)
- ("Separator", ConstByteArrayParameter("\n"))
- ("Terminator", ConstByteArrayParameter("\n"))));
+ ("Separator", ConstByteArrayParameter(lineBreak))
+ ("Terminator", ConstByteArrayParameter(lineBreak))));
}
const int *Base64Decoder::GetDecodingLookupArray()