This commit is contained in:
german 2025-12-24 19:34:23 +04:00
parent 9fe2baa187
commit 7c55f63ee6

View File

@ -77,8 +77,8 @@ unsigned long __generate_hash(char* str) {
unsigned long ret = 0;
size_t max = strlen(str);
while (pos < max) {
ret += (unsigned char)str[pos];
if (ret > (unsigned long)ULONG_MAX - 10) ret = 32;
ret += (unsigned char)str[pos] * pos;
if (ret > (unsigned long)ULONG_MAX - 8) ret = 32;
pos ++;
}
if (ret == 0) ret ++;