[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnugo-devel] bugfix in compute_eyes_pessimistic(): chainlinks
From: |
Arend Bayer |
Subject: |
[gnugo-devel] bugfix in compute_eyes_pessimistic(): chainlinks |
Date: |
Wed, 14 Apr 2004 19:07:57 +0200 (CEST) |
A bug found by valgrind.
Arend
- initialize chainlinks[] in compute_eyes_pessimistic()
Index: engine/optics.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/optics.c,v
retrieving revision 1.87
diff -u -p -r1.87 optics.c
--- engine/optics.c 12 Apr 2004 15:22:30 -0000 1.87
+++ engine/optics.c 14 Apr 2004 12:16:38 -0000
@@ -816,11 +816,12 @@ compute_eyes_pessimistic(int pos, struct
int effective_eyesize;
int bulk_score = 0;
char chainlinks[BOARDMAX];
-
/* Stones inside eyespace which do not coincide with a false eye or
* a halfeye.
*/
int interior_stones = 0;
+
+ memset(chainlinks, 0, BOARDMAX);
for (pos2 = BOARDMIN; pos2 < BOARDMAX; pos2++) {
int k;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnugo-devel] bugfix in compute_eyes_pessimistic(): chainlinks,
Arend Bayer <=