Array too small?
#7

credits to Dracoblue. Simple.
pawn Код:
adler32_hash(buf[])
{
   new length=strlen(buf);
   new s1 = 1;
   new s2 = 0;
   new n;
   for (n=0; n<length; n++)
   {
       s1 = (s1 + buf[n]) % 65521;
       s2 = (s2 + s1)     % 65521;
   }
   return (s2 << 16) + s1;
}
Reply


Messages In This Thread
Array too small? - by LeeXian99 - 20.04.2013, 08:01
Re: Array too small? - by JaKe Elite - 20.04.2013, 08:05
Re: Array too small? - by LeeXian99 - 20.04.2013, 08:07
Re: Array too small? - by JaKe Elite - 20.04.2013, 08:17
Re: Array too small? - by LeeXian99 - 20.04.2013, 08:20
Re: Array too small? - by JaKe Elite - 20.04.2013, 08:27
Re: Array too small? - by HurtLocker - 20.04.2013, 09:16
Re: Array too small? - by Misiur - 20.04.2013, 10:33
Re: Array too small? - by Vince - 20.04.2013, 11:50

Forum Jump:


Users browsing this thread: 2 Guest(s)