From 389a181ea860107aad3f657bc54476fc3b824080 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Thu, 26 May 2016 13:57:09 +0100 Subject: [PATCH] javascript/olm_inbound_group_session.js: fix length arg message.length counts codepoints; we need bytes. --- javascript/olm_inbound_group_session.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javascript/olm_inbound_group_session.js b/javascript/olm_inbound_group_session.js index cfb557f..9d526c4 100644 --- a/javascript/olm_inbound_group_session.js +++ b/javascript/olm_inbound_group_session.js @@ -69,7 +69,7 @@ InboundGroupSession.prototype['decrypt'] = restore_stack(function( var plaintext_buffer = stack(max_plaintext_length); var plaintext_length = session_method(Module["_olm_group_decrypt"])( this.ptr, - message_buffer, message.length, + message_buffer, message_array.length, plaintext_buffer, max_plaintext_length ); return Pointer_stringify(plaintext_buffer, plaintext_length);