On Wed, 14 Jun 2006, Dave Ahn wrote:
> On Tue, Jun 13, 2006 at 08:28:33PM -0700, Trent Piepho wrote:
> > On Wed, 14 Jun 2006, Stephen Thorne wrote:
> > > On 6/14/06, Trent Piepho <xyzzy at speakeasy.org> wrote:
> > > > p_mapchars isn't a string, it's just two characters with no null termination.
> > > > You can't print it with %s.
> > >
> > > You can't? A quick grep in the source shows 58 occurances of printing
> > > p_mapchars with %s.
> >
> > All bugs.  Look at struct.h:
> > ./struct.h:    char p_mapchars[2];              /* Cache for map window image */
>
> Actually, a grep shows:
>
> include/struct.h:    char p_mapchars[3];                /* Cache for map window image, i.e. "R0" */

That's the server, not Hadley's robot.  The robot doesn't have null terminated
p_mapchars, while the server does (now, didn't used to long ago).

Only the 16 occurences of p_mapchars getting printed with %s in Hadley's robot
source code are bugs.  I guess the 58 number Stephen came up with if for all
the Vanilla code, I thought he was just talking about the bot code, as that
was what was being discussed.

The other robots like the inl bot or puck are completely different code, and
use the exact same p_mapchars data as the server, since it's in the shared
memory segment.