summaryrefslogtreecommitdiff
path: root/src/chess.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/chess.h')
-rwxr-xr-xsrc/chess.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/chess.h b/src/chess.h
index c815701..2bfec4d 100755
--- a/src/chess.h
+++ b/src/chess.h
@@ -1233,8 +1233,8 @@ _assert(CHAR *szFile, ULONG uLine);
RANK1(c) || \
FILEA(c) || \
FILEH(c))
-#define CORNER_DISTANCE(c) (MAX(MIN((ULONG)abs(RANK(c) - 7), RANK(c)),\
- MIN((ULONG)abs(FILE(c) - 7), FILE(c))))
+#define CORNER_DISTANCE(c) (MAX(MIN((ULONG)(RANK(c) - 7), RANK(c)),\
+ MIN((ULONG)(FILE(c) - 7), FILE(c))))
#define IN_CORNER(c) (((c) == A8) || \
((c) == A1) || \
((c) == H8) || \