• Welcome to the Kancolle Wiki!
  • If you have any questions regarding site content, account registration, etc., please visit the KanColle Wiki Discord

Changes

Jump to navigation Jump to search
no edit summary
Line 22: Line 22:  
function p.hashString(string)
 
function p.hashString(string)
 
local hash = 0
 
local hash = 0
for letter in string do
+
for i = 1, #string do
 +
local letter = str:sub(i,i)
 
hash = bit32.lshift(hash,1)
 
hash = bit32.lshift(hash,1)
 
hash = hash+string.byte(letter) % (2^31-1)
 
hash = hash+string.byte(letter) % (2^31-1)
2,922

edits

Navigation menu