changeset 182:27f90a2a8198 draft

Gavin: BIO_FLAGS_BASE64_NO_NL
author Gavin Andresen <gavinandresen@gmail.com>
date Mon, 26 Jul 2010 17:41:47 +0000
parents 99851818e5b7
children 5447d5ff8a3c
files rpc.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rpc.cpp
+++ b/rpc.cpp
@@ -765,13 +765,14 @@
     BUF_MEM *bptr;
 
     b64 = BIO_new(BIO_f_base64());
+    BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
     bmem = BIO_new(BIO_s_mem());
     b64 = BIO_push(b64, bmem);
     BIO_write(b64, s.c_str(), s.size());
     BIO_flush(b64);
     BIO_get_mem_ptr(b64, &bptr);
 
-    string result(bptr->data, bptr->length-1);
+    string result(bptr->data, bptr->length);
     BIO_free_all(b64);
 
     return result;