|
|
@@ -5,9 +5,9 @@
|
|
|
inline SQHash _hashstr (const SQChar *s, size_t l)
|
|
|
{
|
|
|
SQHash h = (SQHash)l; /* seed */
|
|
|
- size_t step = (l>>5)|1; /* if string is too long, don't hash all its chars */
|
|
|
+ size_t step = (l>>5)+1; /* if string is too long, don't hash all its chars */
|
|
|
for (; l>=step; l-=step)
|
|
|
- h = h ^ ((h<<5)+(h>>2)+(unsigned short)*(s++));
|
|
|
+ h ^= ((h<<5)+(h>>2)+(SQUChar)(s[l-1]));
|
|
|
return h;
|
|
|
}
|
|
|
|