[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] arraybound violations in cosmic gnugo-3.1.24
From: |
Teun Burgers |
Subject: |
[gnugo-devel] arraybound violations in cosmic gnugo-3.1.24 |
Date: |
Mon, 04 Feb 2002 16:01:01 +0100 |
This patch fixes arraybound violations that showed
up for atari_atari test 8, with the "cosmic" version.
Options used where:
--experimental-semeai --experimental-connections --alternate-connections
--experimental-influence --owl-threats
Perhaps we could have a --cosmic option to effect all experimental options in
one go.
Teun
diff -u readconnect.c{.orig,}
--- readconnect.c.orig Mon Feb 4 15:49:54 2002
+++ readconnect.c Mon Feb 4 15:54:28 2002
@@ -2467,9 +2467,10 @@
/* Case 9. One-space jump to empty vertex "e" through empty
* vertex "g", which makes "g" self_atari for opponent.
*/
- if (conn->distances[epos] > distance + 1.1
- && board[gpos] == EMPTY
- && board[epos] == EMPTY && does_secure(color, epos, gpos)) {
+ if (board[gpos] == EMPTY
+ && board[epos] == EMPTY
+ && conn->distances[epos] > distance + 1.1
+ && does_secure(color, epos, gpos)) {
ENQUEUE(conn, epos, distance + 1.1, 1.0);
}
@@ -2485,14 +2486,14 @@
/* Case 11. Keima to f or j on edge and one space jump on
* first or second line.
*/
- if ((conn->distances[fpos] > distance + 1.3
- || conn->distances[epos] > distance + 1.5)
- && countlib(pos) >= 3
- && board[apos] == EMPTY
+ if (board[apos] == EMPTY
&& board[bpos] == EMPTY
&& board[gpos] == EMPTY
&& board[epos] == EMPTY
&& board[fpos] == EMPTY
+ && (conn->distances[fpos] > distance + 1.3
+ || conn->distances[epos] > distance + 1.5)
+ && countlib(pos) >= 3
&& (!ON_BOARD(cpos) || !ON_BOARD(hpos))) {
ENQUEUE(conn, fpos, distance + 1.3, 1.0);
ENQUEUE(conn, epos, distance + 1.3, 1.0);
- [gnugo-devel] arraybound violations in cosmic gnugo-3.1.24,
Teun Burgers <=