[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gnugo-devel] patch: malloc(0) and array bound violation
From: |
Arend Bayer |
Subject: |
Re: [gnugo-devel] patch: malloc(0) and array bound violation |
Date: |
Fri, 20 Aug 2004 17:15:30 +0200 (CEST) |
Gunnar wrote:
> That code (original, not patch) looks odd:
> > for (k = 0; k < best_vp->num_defenses && k < MAX_EYE_ATTACKS; k++)
> > vital[pos].defense_points[k] = best_vp->defenses[k];
> > - for (k = 0; k < best_vp->num_attacks; k++)
>
> Unless Arend was trying something unexpectedly clever it's probably
> just a mistake that the second loop doesn't have the k <
> MAX_EYE_ATTACKS condition like the first loop.
Seems I am unexpectedly unclever more often than unexpectedly clever --
time to revise expectations perhaps...
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [gnugo-devel] patch: malloc(0) and array bound violation,
Arend Bayer <=