浏览代码

fix(genpass): use `log()` instead of `log2()` for zsh < 5.6 (#9548)

Fixes #9548
Marc Cornellà 3 年之前
父节点
当前提交
90ffda7ed2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/genpass/genpass-xkcd

+ 1 - 1
plugins/genpass/genpass-xkcd

@@ -43,7 +43,7 @@ fi
 
 # Figure out how many words we need for 128 bits of security margin.
 # Each word adds log2($#words) bits.
-local -i n=$((ceil(128. / log2($#words))))
+local -i n=$((ceil(128. / (log($#words) / log(2)))))
 
 {
   local c