diff --git a/project/src/utils/RandomUtil.ts b/project/src/utils/RandomUtil.ts index 86f6e06a..1e07f269 100644 --- a/project/src/utils/RandomUtil.ts +++ b/project/src/utils/RandomUtil.ts @@ -389,6 +389,10 @@ export class RandomUtil { * @returns A random integer within the specified range. */ public randInt(low: number, high?: number): number { + if (low === high) { + return low; + } + if (typeof high !== "undefined") { return crypto.randomInt(low, high); }