mirror of
https://github.com/imezx/Warp.git
synced 2026-03-18 00:44:16 +00:00
rewrite(phase4): fix wrong hash
This commit is contained in:
parent
04e7f65a3a
commit
219b62b6d2
1 changed files with 1 additions and 1 deletions
|
|
@ -15,7 +15,7 @@ return function(name: string): number
|
||||||
|
|
||||||
local b: number = hash
|
local b: number = hash
|
||||||
for i = 1, #name do
|
for i = 1, #name do
|
||||||
b = bit32.bxor(bit32.lshift(hash, 5) + b, string.byte(name, i))
|
b = bit32.bxor(bit32.lshift(b, 5) + b, string.byte(name, i))
|
||||||
end
|
end
|
||||||
|
|
||||||
local reduced = bit32.band(b, MAX_VALUE)
|
local reduced = bit32.band(b, MAX_VALUE)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue