diff options
| -rw-r--r-- | src/box32.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/box32.c b/src/box32.c index 1bac0faa..f3204b05 100644 --- a/src/box32.c +++ b/src/box32.c @@ -18,7 +18,7 @@ KHASH_MAP_INIT_STR(strings, ptr_t); static kh_from_t* hash_from = NULL; static kh_to_t* hash_to = NULL; #define HASH_MSK 0xf000000f -#define HASH_VAL 0x00ffffff +#define HASH_VAL 0x007fffff #define HASH_SHIFT 4 static uint32_t hash_cnt = 1; static pthread_rwlock_t hash_lock = {0}; @@ -88,7 +88,7 @@ uintptr_t from_hash_d(ulong_t l) { // Convert from 64bits to hash key, creating it if needed ulong_t to_hash(uintptr_t p) { - if((p<0x100000000LL) && ((p&HASH_MSK)!=HASH_MSK)) + if((p>0x100000000LL) && ((p&HASH_MSK)!=HASH_MSK)) return (ulong_t)p; if(p==0xffffffffffffffffll) { return 0xffffffff; @@ -120,7 +120,7 @@ ulong_t to_hash(uintptr_t p) { // Convert from 64bits to hash key and delete the entry from both hash table ulong_t to_hash_d(uintptr_t p) { - if((p<0x100000000LL) && ((p&HASH_MSK)!=HASH_MSK)) + if((p>0x100000000LL) && ((p&HASH_MSK)!=HASH_MSK)) return (ulong_t)p; if(p==0xffffffffffffffffll) return 0xffffffff; |