Fixed base64 issue with UTF-8 strings

Signed-off-by: Nicolas Williams <nico@cryptonector.com>
This commit is contained in:
William Langford authored and Nicolas Williams committed 2014-07-01 22:56:13 -05:00
1 parent ba1acbe961
commit 9f4d7e2fb8
2 files changed
+6 -1

No files matched your search

+1 -1
View File
@@ -454,7 +454,7 @@ static jv f_format(jv input, jv fmt) {
input = f_tostring(input);
jv line = jv_string("");
const char b64[64 + 1] = CHARS_ALPHANUM "+/";
const char* data = jv_string_value(input);
const unsigned char* data = (const unsigned char*)jv_string_value(input);
int len = jv_string_length_bytes(jv_copy(input));
for (int i=0; i<len; i+=3) {
uint32_t code = 0;