projects
/
citadel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
CtdlEncodeBase64() - only add linebreaks if told to by the caller.
[citadel.git]
/
libcitadel
/
lib
/
base64.c
diff --git
a/libcitadel/lib/base64.c
b/libcitadel/lib/base64.c
index 1134588b38045b17072565c15887e2e62df17752..a7be64d9a2834a146076de9dbddda2786c8deb2e 100644
(file)
--- a/
libcitadel/lib/base64.c
+++ b/
libcitadel/lib/base64.c
@@
-88,8
+88,10
@@
size_t CtdlEncodeBase64(char *dest, const char *source, size_t sourcelen, int li
bytes_output += 4;
}
if ( ((bytes_processed % 57) == 0) || (bytes_processed >= sourcelen) ) {
- sprintf(&dest[bytes_output], "\r\n");
- bytes_output += 2;
+ if (linebreaks) {
+ sprintf(&dest[bytes_output], "\r\n");
+ bytes_output += 2;
+ }
}
}