]> git.immae.eu Git - perso/Immae/Projets/Cryptomonnaies/BIP39.git/commitdiff
jsbip39 updated to latest version
authorIan Coleman <coleman.ian@gmail.com>
Mon, 7 Nov 2016 00:33:47 +0000 (11:33 +1100)
committerIan Coleman <coleman.ian@gmail.com>
Mon, 7 Nov 2016 00:33:47 +0000 (11:33 +1100)
src/js/jsbip39.js

index 80ce656583dda9cb8a726ebe28986c50f6df77a4..67ba5a7829dbd6927b85d91db52f82a1a34b1aee 100644 (file)
@@ -98,7 +98,7 @@ var Mnemonic = function(language) {
 
     self.check = function(mnemonic) {
         var mnemonic = self.splitWords(mnemonic);
-        if (mnemonic.length % 3 > 0) {
+        if (mnemonic.length == 0 || mnemonic.length % 3 > 0) {
             return false
         }
         // idx = map(lambda x: bin(self.wordlist.index(x))[2:].zfill(11), mnemonic)