gnugo-devel
[Top][All Lists]
Advanced

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

Re: [gnugo-devel] a small patch


From: Gunnar Farneback
Subject: Re: [gnugo-devel] a small patch
Date: Sun, 29 Sep 2002 19:04:45 +0200
User-agent: EMH/1.14.1 SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.3 Emacs/20.7 (sparc-sun-solaris2.7) (with unibyte mode)

Nando wrote:
> and fixes an array bounds violation bug.
> [...]
>      for (k = 0; k < 4; k++) {
>        int pos2 = pos + delta[k];
> +      if (!ON_BOARD(pos2))
> +       continue;
>        if ((board[pos] == other || pos == apos) && board[pos2] == EMPTY) {
>          ENQUEUE(pos2, dists[pos] + 1);
>        }

This change may make the code more obvious but there's no array bounds
violation going on here, as far as I can see. Please explain how that
would occur.

/Gunnar




reply via email to

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