mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-27 04:39:52 +00:00
Fix random string code
This commit is contained in:
@@ -93,7 +93,7 @@ export class Random {
|
||||
public static getString(choices: string, length: number) {
|
||||
const _choices = choices.split("");
|
||||
const result = new Array(length);
|
||||
for (const i in result) {
|
||||
for (let i = 0; i < length; i++) {
|
||||
result[i] = _choices[Random.nextInt(0, _choices.length)];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user