1
0
mirror of https://github.com/S2-/pwgen.git synced 2025-08-02 08:50:04 +02:00

fix length generator

This commit is contained in:
s2
2017-11-23 08:49:33 +01:00
parent 06cfa9d0da
commit 005570d04d

View File

@@ -15,7 +15,7 @@ function randPassword(length, includeSpecial) {
} }
function generateLength() { function generateLength() {
return Math.floor(Math.random() * getParams().lengthMax - getParams().lengthMin + 1) + getParams().lengthMin; return Math.floor(Math.random() * (1 + getParams().lengthMax - getParams().lengthMin)) + getParams().lengthMin;
} }
function getParams() { function getParams() {