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

make it work with 0

This commit is contained in:
s2
2017-11-23 08:53:59 +01:00
parent 969ad13e23
commit 8b02b259da

View File

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