[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] score estimation does not work
From: |
Arend Bayer |
Subject: |
Re: [gnugo-devel] score estimation does not work |
Date: |
Thu, 31 Mar 2005 12:29:49 +0200 (CEST) |
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);
> }
> ===========================================================================