javascript/olm_inbound_group_session.js: fix length arg

message.length counts codepoints; we need bytes.
This commit is contained in:
Richard van der Hoff 2016-05-26 13:57:09 +01:00
parent 315fbfc921
commit 389a181ea8

View file

@ -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);