03.02.2009, 17:20
it maybe sounds dumb to you, but have you try switching the code, positive to negative?
i dont know how this code does its job, so it was just a random thought:
anyways, the solution shouldnt be that hard, because for any good thing, there is a bad thing, for any beautiful thing, there is a ugly thing etc.
Quote:
stock udb_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; } |
anyways, the solution shouldnt be that hard, because for any good thing, there is a bad thing, for any beautiful thing, there is a ugly thing etc.