mirror of
https://github.com/S2-/pwgen.git
synced 2025-08-02 00:40:08 +02:00
fix length generator
This commit is contained in:
@@ -15,7 +15,7 @@ function randPassword(length, includeSpecial) {
|
||||
}
|
||||
|
||||
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() {
|
||||
|
Reference in New Issue
Block a user