From 566c3aeb7bcabac8d034689c1b8479810f44649a Mon Sep 17 00:00:00 2001 From: dy Date: Thu, 28 Dec 2023 18:19:40 +0800 Subject: [PATCH] =?UTF-8?q?fix=20=E5=85=AC=E5=85=B1=E6=96=B9=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/global.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/global.ts b/src/global.ts index 26105d1..20bc6b0 100644 --- a/src/global.ts +++ b/src/global.ts @@ -233,7 +233,7 @@ export function ctor() { } Array.prototype.random = function (this: Array) { - return this[PublicShared.randomNum(0, this.length)]; + return this[PublicShared.randomNum(0, this.length - 1)]; }; Array.prototype.intersection = function (this: Array, other: Array) {