gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [gnugo-devel] A crash


From: Portela Fernando
Subject: RE: [gnugo-devel] A crash
Date: Fri, 23 Apr 2004 10:39:58 +0200

Hi again,

I wrote:
>    READ_RETURN_HASH_NG(BREAK_IN, str, depth - stackp, 
>                        goal_hash, move, NO_MOVE, WIN);
>
> I'm not familiar with the code, so I fixed the problem by initializing the
> variable and went to preventively do the same in the other function. The
> above line is maybe the proper fix, you certainly can tell better than me.

At which point I wonder if the proper fix wouldn't be something like the
appended patch, which would apparently make things consistent between the
#if branches.

nando

- bugfixes in recursive_break()

Index: engine/readconnect.c
===================================================================
RCS file: /cvsroot/gnugo/gnugo/engine/readconnect.c,v
retrieving revision 1.75
diff -u -p -r1.75 readconnect.c
--- engine/readconnect.c        23 Apr 2004 00:29:36 -0000      1.75
+++ engine/readconnect.c        23 Apr 2004 08:16:31 -0000
@@ -3001,7 +3001,7 @@ recursive_break(int str, const char goal
     SGFTRACE(NO_MOVE, WIN, "no move, probably connected");
 #if USE_HASHTABLE_NG
     READ_RETURN_HASH_NG(BREAK_IN, str, depth - stackp,
-                       goal_hash, move, xpos, WIN);
+                       goal_hash, move, NO_MOVE, WIN);
 #else
     READ_RETURN(read_result, move, NO_MOVE, WIN);
 #endif
@@ -3011,7 +3011,7 @@ recursive_break(int str, const char goal
     SGFTRACE(savemove, savecode, "saved move");
 #if USE_HASHTABLE_NG
     READ_RETURN_HASH_NG(BREAK_IN, str, depth - stackp,
-                       goal_hash, move, xpos, savecode);
+                       goal_hash, move, savemove, savecode);
 #else
     READ_RETURN(read_result, move, savemove, savecode);
 #endif
@@ -3020,7 +3020,7 @@ recursive_break(int str, const char goal
   SGFTRACE(0, 0, NULL);
 #if USE_HASHTABLE_NG
   READ_RETURN_HASH_NG(BREAK_IN, str, depth - stackp,
-                     goal_hash, move, xpos, 0);
+                     goal_hash, move, NO_MOVE, 0);
 #else
   READ_RETURN(read_result, move, NO_MOVE, 0);
 #endif




reply via email to

[Prev in Thread] Current Thread [Next in Thread]