wesnoth-dev
[Top][All Lists]
Advanced

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

Re: [Wesnoth-dev] KISS Solution to user campaign stability problems


From: Guillaume Melquiond
Subject: Re: [Wesnoth-dev] KISS Solution to user campaign stability problems
Date: Fri, 24 Jun 2005 14:22:46 -0400

On 6/23/05, David White <address@hidden> wrote:
> This was caused because I didn't notice that the function
> preprocess_file() had been changed to take a const pointer to the
> defines map which it doesn't modify. I've committed a fix by making
> preprocess_file() once again modify the map that's passed in with the
> new defines. This means that user campaigns will inherit the defines map
> from the parse of game.cfg as they should.

As far as I remember, this has always been the behavior of
preprocess_file; or at least it has been that way since I joined the
project, and I didn't change it when I rewrote the preprocessor. But I
agree it is the wrong behavior, it is why I had suggested to ott to
change it to something saner :-).

> It'd be great if silene could look over this change to make sure I
> didn't break anything.

Seems fine at first and short glance (I'm in a restaurant right now,
so I don't have much time to look at it).

ott: your patch was almost fine, your only mistake was that you were
copying the wrong preproc_map in the second occurrence of game.cpp

> >Since 0.9.2 we also seem to have made the parser very fussy about missing
> >newlines at the end of file, at least when parsing the main campaign .cfg
> >file -- if the last line is not newline terminated it will apparently
> >be ignored, and since the last line is often #endif this is fatal for
> >many campaigns.  See my overview of the campaign server downloads at
> >    http://www.wesnoth.org/forum/viewtopic.php?t=6463
> >where many of the campaigns will at least pass the basic syntax check
> >if they get a final newline.
> >
> >
> I'm not sure how this problem was caused. It'd be great if it could be
> fixed though.

I can take a look at it once I'm back (I will have a short-time access
to my Wesnoth computer at the start of July), but not before
unfortunately. It is strange that there is such a bug though: it
didn't happen when user campaigns were parsed like the main campaigns;
but now that we are parsing them separately, newlines get significant.
I just have no idea why it is so (since in both cases we are simply
parsing a whole file).




reply via email to

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