summaryrefslogtreecommitdiff
path: root/src/hash.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hash.c')
-rwxr-xr-xsrc/hash.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/hash.c b/src/hash.c
index 4b0cc0a..a29e375 100755
--- a/src/hash.c
+++ b/src/hash.c
@@ -67,9 +67,11 @@ Revision History:
// for other processors, change the constant below.
//
#define CONVERT_SEARCH_DEPTH_TO_HASH_DEPTH(x) \
- ASSERT(IS_VALID_DEPTH(x)); \
- (x) >>= 4; \
- ASSERT(((x) & 0xffffff00) == 0);
+ do { \
+ ASSERT(IS_VALID_DEPTH(x)); \
+ (x) >>= 4; \
+ ASSERT(((x) & 0xffffff00) == 0); \
+ } while (0)
#define HASH_ENTRY_IS_DIRTY(x) \
(((x).bvFlags & 0xF0) != g_cDirty)
@@ -392,7 +394,7 @@ Return value:
// replace the "always replace" 1st entry on the line unless it
// contains mate information and is not stale.
//
- if (((abs(pEntry[1].iValue >= +NMATE)) &&
+ if (((abs(pEntry[1].iValue) >= +NMATE) &&
(abs(iValue) < +NMATE)) &&
(!HASH_ENTRY_IS_DIRTY(pEntry[1])))
{
@@ -405,7 +407,7 @@ Return value:
pEntry[3] = pEntry[1];
}
pStore = &(pEntry[1]);
-
+
end:
ASSERT(pStore != NULL);
return(pStore);
@@ -766,6 +768,7 @@ Return value:
goto end;
}
}
+ pHash++;
}
end: