[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] arraybound violation in 3.1.17, moves_to_connect_in_three_
From: |
Teun Burgers |
Subject: |
[gnugo-devel] arraybound violation in 3.1.17, moves_to_connect_in_three_moves |
Date: |
Tue, 18 Dec 2001 10:01:43 +0100 |
The construct that is faulty in moves_to_connect_in_three_moves,
occurs twice in this function. The second occurence causes
the violation, the first occurence was fixed by Dan.
This patch fixes the second occurence.
Teun
--- readconnect.c.orig Tue Dec 18 08:48:51 2001
+++ readconnect.c Tue Dec 18 08:48:22 2001
@@ -613,8 +613,9 @@
*/
for (k = 0; k < 8; k++) {
if (!does_connect
- || secondlib1[libs[s] + delta[k]]
- || secondlib2[libs[s] + delta[k]]) {
+ || (ON_BOARD(libs[s] + delta[k])
+ && (secondlib1[libs[s] + delta[k]]
+ || secondlib2[libs[s] + delta[k]]))) {
add_array(moves, libs[s]);
break;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnugo-devel] arraybound violation in 3.1.17, moves_to_connect_in_three_moves,
Teun Burgers <=