summaryrefslogtreecommitdiff
path: root/plugins/genpass
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2020-12-27 20:51:39 +0100
committerMarc Cornellà <marc.cornella@live.com>2020-12-27 20:51:39 +0100
commit90ffda7ed28dd8273b80bd262c6a28be65e4da71 (patch)
tree2c9c624c2535d0fd07db8775eb045549ca3fb2c3 /plugins/genpass
parente9991c6aa09ed5b0a2ac3eeb095364bc3c06953e (diff)
downloadzsh-90ffda7ed28dd8273b80bd262c6a28be65e4da71.tar.gz
zsh-90ffda7ed28dd8273b80bd262c6a28be65e4da71.tar.bz2
zsh-90ffda7ed28dd8273b80bd262c6a28be65e4da71.zip
fix(genpass): use `log()` instead of `log2()` for zsh < 5.6 (#9548)
Fixes #9548
Diffstat (limited to 'plugins/genpass')
-rwxr-xr-xplugins/genpass/genpass-xkcd2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/genpass/genpass-xkcd b/plugins/genpass/genpass-xkcd
index a486ccb40..ed0397138 100755
--- a/plugins/genpass/genpass-xkcd
+++ b/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