bug-gnubg
[Top][All Lists]
Advanced

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

Re: [Bug-gnubg] Predefined boards - Windows build 021130


From: Joern Thyssen
Subject: Re: [Bug-gnubg] Predefined boards - Windows build 021130
Date: Sun, 1 Dec 2002 15:48:48 +0000
User-agent: Mutt/1.4i

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?).

But the following ugly code works:

pc = ppc->pbde->szTitle;
ppc->pbde->szTitle = g_strdup_printf ( "%s%s", pc, sz );
free ( pc );

Feel free to change this!

Jørn




reply via email to

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