From 552da6eafecc29f6900854ebe7c55fa8a96002e4 Mon Sep 17 00:00:00 2001
From: Hubert Chathi <hubert@uhoreg.ca>
Date: Tue, 26 Jun 2018 22:18:25 -0400
Subject: [PATCH] use the correct method to get the random length

---
 javascript/olm_pk.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/javascript/olm_pk.js b/javascript/olm_pk.js
index e63e907..700139d 100644
--- a/javascript/olm_pk.js
+++ b/javascript/olm_pk.js
@@ -120,7 +120,7 @@ PkDecryption.prototype['free'] = function() {
 
 PkDecryption.prototype['generate_key'] = restore_stack(function () {
     var random_length = pk_decryption_method(
-        Module['_olm_pk_key_length'] // FIXME: wrong method
+        Module['_olm_pk_generate_key_random_length']
     )();
     var random_buffer = random_stack(random_length);
     var pubkey_length = pk_encryption_method(
-- 
GitLab