aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-05-26 13:57:09 +0100
committerRichard van der Hoff <richard@matrix.org>2016-05-26 13:57:09 +0100
commit389a181ea860107aad3f657bc54476fc3b824080 (patch)
tree41f0474681718e987ec1ff79afa633765b831f55
parent315fbfc9211d0b7369dc9cb43bbffc8100f30e16 (diff)
javascript/olm_inbound_group_session.js: fix length arg
message.length counts codepoints; we need bytes.
-rw-r--r--javascript/olm_inbound_group_session.js2
1 files changed, 1 insertions, 1 deletions
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);