[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-gnubg] Predefined boards - Windows build 021130
From: |
Jim Segrave |
Subject: |
Re: [Bug-gnubg] Predefined boards - Windows build 021130 |
Date: |
Sun, 1 Dec 2002 17:25:14 +0100 |
User-agent: |
Mutt/1.2.5.1i |
On Sun 01 Dec 2002 (15:48 +0000), Joern Thyssen wrote:
> On Sun, Dec 01, 2002 at 04:43:36PM +0100, Øystein Johansen wrote
> > >===== Original Message From "Nardy Pillards" <address@hidden> =====
> > >When I change the boards.xml file so that there are no more return
> > >characters, it does work.
> > >
> >
> > Hmmm, which version of xml2 are you using? It sonds to me that there is
> > some
> > kind of trouble with the xml parsing.
> >
> > I've always used Igor's:
> > http://www.fh-frankfurt.de/~igor/projects/libxml/index.html
>
> I think it's a bug in my code.
>
> The callback function ScanCharacters may actually be called multiple
> times for the same tag. My code was:
>
> ppc->pbde->szTitle = g_strdup( sz );
>
> which will only work if ScanCharacters is called once (as it is on my
> linux box).
>
> I would have changed the code to:
>
> pc = ppc->pbde->szTitle;
> ppc->pbde->szTitle = g_strconcat ( pc, sz );
> free ( pc );
>
> but that gave core dumps on my box (does anyone have an idea why?).
Try: ppc->pbde->szTitle = g_strconcat ( pc, sz, 0);
g_strconcat is a varargs function and requires a null pointer to
terminate the list of arguments.
--
Jim Segrave address@hidden