mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-20 05:51:35 +02:00
Fix
This commit is contained in:
@@ -42,7 +42,7 @@ module.exports = class NameRaterCommand extends Command {
|
|||||||
stringToSeed(str) {
|
stringToSeed(str) {
|
||||||
if (!str) return 0;
|
if (!str) return 0;
|
||||||
let hash = 0n;
|
let hash = 0n;
|
||||||
for (const char of s.split('')) {
|
for (const char of str.split('')) {
|
||||||
hash = (31n * hash) + BigInt(char.charCodeAt(0));
|
hash = (31n * hash) + BigInt(char.charCodeAt(0));
|
||||||
}
|
}
|
||||||
return hash;
|
return hash;
|
||||||
|
|||||||
Reference in New Issue
Block a user