Hi Bertram!

Bertram Felgenhauer wrote:

> trying to estimate the score of a game from the command line,
> 
> # gnugo --score estimate <sgf file>
> 
> results in a segmentation fault.

Thanks for the patch, I have applied it.

Gruesse
Arend

> Analysis: the fault occurs when engine/interface.c::gnugo_estimate_score
> (called from interface/play_solo.c::load_and_score_sgf_file with arguments
> (NULL, NULL)) tries to store the upper bound result.
> 
> Proposed fix:
> ===========================================================================
> diff -u -r1.51 interface.c
> --- engine/interface.c  6 Jan 2005 19:50:27 -0000       1.51
> +++ engine/interface.c  29 Mar 2005 19:40:43 -0000
> @@ -353,8 +353,10 @@
>  gnugo_estimate_score(float *upper, float *lower)
>  {
>    silent_examine_position(EXAMINE_DRAGONS);
> -  *upper = white_score;
> -  *lower = black_score;
> +  if (upper != NULL)
> +    *upper = white_score;
> +  if (lower != NULL)
> +    *lower = black_score;
>    return ((white_score + black_score)/2.0);
>  }
> ===========================================================================


_______________________________________________
gnugo-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnugo-devel

Reply via email to