On 2011/2/14, Mark de Wever wrote:

> First I'm not sure what you're talking about, but I've a problem that
> the code of the VALIDATE macro is broken due to Lua. The code works
> properly in 1.4, works properly in 1.6, works properly 1.8, works
> properly in trunk r48229, except when Lua happens to be in the
> callstack.

Why are you saying it is broken? Let me quote the documentation of the
VALIDATE macro:

 * The macro to use for the validation of WML
 *
 *  @param cond         The condition to test, if false and exception
is generated.
 *  @param message      The translatable message to show at the user.

Right now, if the condition to test is false, the VALIDATE macro
raises an exception, and the message is displayed to the user. Even
when Lua is in the middle. So it is working fine in my book. Perhaps
you have another semantic in mind for this macro, but I'm not psychic
and I can't guess it.

> So the code works properly until it hits Lua, which seems to
> be not exception-safe.

Lua is exception-safe. There isn't a single exception that can cause
it to crash, as long as you don't go directly modify the content of
the src/lua directory.

> So you broke a working feature with the current
> Lua implementation and worse your changes also break the feature when
> there is no Lua in the callstack.

FUD.

> But please take your own advice and fix the
> Lua implementation so VALIDATE works again.

VALIDATE works just fine; an exception is raised, and a message is
displayed to the user. Sure, it doesn't display a GUI2 dialog box, and
it doesn't cause the scenario to abruptly exit. But I don't call that
a bug.

But I don't care anymore: I'm now stripped from my commit rights and I
won't be able to prevent you anymore from putting security breaches in
Wesnoth.

_______________________________________________
Wesnoth-dev mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-dev

Reply via email to