Changeset 5caede in git


Ignore:
Timestamp:
Nov 2, 2012, 2:28:44 PM (10 years ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'a800fe4b3e9d37a38c5a10cc0ae9dfa0c15a4ee6')
Children:
12777c5748c82636b06dbe5ed71f2459864064c1
Parents:
f8956562764c1278bc32cbc7e345d0b73ff82807
Message:
fix: int overflow in hash function
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/links/ndbm.cc

    rf89565 r5caede  
    428428        29, 25, 21, 17, 13,  9,  5,  1,
    429429};
    430 static long hltab[64]
     430static unsigned long hltab[64]
    431431 = {
    432432        06100151277L,06106161736L,06452611562L,05001724107L,
     
    452452  register int s, c, j;
    453453  register char *cp;
    454   register long hashl;
    455   register int hashi;
     454  register unsigned long hashl;
     455  register unsigned int hashi;
    456456
    457457  hashl = 0;
     
    467467    }
    468468  }
    469   return (hashl);
     469  return (long)(hashl);
    470470}
    471471
Note: See TracChangeset for help on using the changeset viewer.