1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-22 05:40:08 +00:00

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

Fixes #9548
This commit is contained in:
Marc Cornellà 2020-12-27 20:51:39 +01:00
parent e9991c6aa0
commit 90ffda7ed2

View file

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