fix linebreak bug
parent
59d3b374cb
commit
bedabc93fb
|
|
@ -13,6 +13,8 @@ void Base64Encoder::IsolatedInitialize(const NameValuePairs ¶meters)
|
||||||
{
|
{
|
||||||
bool insertLineBreaks = parameters.GetValueWithDefault("InsertLineBreaks", true);
|
bool insertLineBreaks = parameters.GetValueWithDefault("InsertLineBreaks", true);
|
||||||
int maxLineLength = parameters.GetIntValueWithDefault("MaxLineLength", 72);
|
int maxLineLength = parameters.GetIntValueWithDefault("MaxLineLength", 72);
|
||||||
|
|
||||||
|
const char *lineBreak = insertLineBreaks ? "\n" : "";
|
||||||
|
|
||||||
m_filter->Initialize(CombinedNameValuePairs(
|
m_filter->Initialize(CombinedNameValuePairs(
|
||||||
parameters,
|
parameters,
|
||||||
|
|
@ -20,8 +22,8 @@ void Base64Encoder::IsolatedInitialize(const NameValuePairs ¶meters)
|
||||||
("PaddingByte", s_padding)
|
("PaddingByte", s_padding)
|
||||||
("Log2Base", 6)
|
("Log2Base", 6)
|
||||||
("GroupSize", insertLineBreaks ? maxLineLength : 0)
|
("GroupSize", insertLineBreaks ? maxLineLength : 0)
|
||||||
("Separator", ConstByteArrayParameter("\n"))
|
("Separator", ConstByteArrayParameter(lineBreak))
|
||||||
("Terminator", ConstByteArrayParameter("\n"))));
|
("Terminator", ConstByteArrayParameter(lineBreak))));
|
||||||
}
|
}
|
||||||
|
|
||||||
const int *Base64Decoder::GetDecodingLookupArray()
|
const int *Base64Decoder::GetDecodingLookupArray()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue