diff options
author | Marc Cornellà <marc.cornella@live.com> | 2020-12-27 20:51:39 +0100 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2020-12-27 20:51:39 +0100 |
commit | 90ffda7ed28dd8273b80bd262c6a28be65e4da71 (patch) | |
tree | 2c9c624c2535d0fd07db8775eb045549ca3fb2c3 /plugins/genpass | |
parent | e9991c6aa09ed5b0a2ac3eeb095364bc3c06953e (diff) | |
download | zsh-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-x | plugins/genpass/genpass-xkcd | 2 |
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 |