Merge pull request #6 from pmatos/patch-4
Make variables unsigned to avoid ub in calculation original commit: 2c404b7232555b405027819fd1841cefe5322180
This commit is contained in:
commit
a0fea7f0a8
|
@ -85,7 +85,7 @@ static ptr bvstring(const char *s) {
|
|||
|
||||
/* multiplier weights each character, h = n factors in the length */
|
||||
static iptr symhash(s) const char *s; {
|
||||
iptr n, h;
|
||||
uptr n, h;
|
||||
|
||||
h = n = strlen(s);
|
||||
while (n--) h = h * multiplier + *s++;
|
||||
|
|
Loading…
Reference in New Issue
Block a user