[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Enigma-devel] Re: Enigma 1.00 beta Released!
From: |
Ronald Lamprecht |
Subject: |
Re: [Enigma-devel] Re: Enigma 1.00 beta Released! |
Date: |
Sat, 25 Nov 2006 16:20:05 +0100 |
User-agent: |
Mozilla Thunderbird 1.0.7 (Windows/20050923) |
Hi,
Erich Schubert wrote:
I've been using the included lua for some versions now. I noticed I
didn't really test r472; I've built a package of r473 but it also has
the same problem.
Please find attached a small patch that sets some redundant braces. It
sounds like the else clause is attached to the wrong if statement. But
that would be a major compiler bug.
Otherwise just delete the else clause as and check if Enigma is running.
The else clause just protects faulty levels to crash the app.
Ronald
Index: src/lua.cc
===================================================================
--- src/lua.cc (revision 469)
+++ src/lua.cc (working copy)
@@ -358,12 +358,14 @@
double x = lua_tonumber(L,1);
double y = lua_tonumber(L,2);
Actor *ac = dynamic_cast<Actor*>(to_object(L, 3));
- if( ! ac)
+ if( ! ac) {
throwLuaError(L, "object is no valid actor");
- if (world::IsInsideLevel(GridPos(round_down<int>(x), round_down<int>(y))))
+ }
+ if (world::IsInsideLevel(GridPos(round_down<int>(x), round_down<int>(y))))
{
world::AddActor(x, y, ac);
- else
+ } else {
throwLuaError(L, "position is outside of world");
+ }
return 0;
}
- [Enigma-devel] Enigma 1.00 beta Released!, Ronald Lamprecht, 2006/11/22
- [Enigma-devel] Re: Enigma 1.00 beta Released!, Erich Schubert, 2006/11/24
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!, Ronald Lamprecht, 2006/11/24
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!, Ronald Lamprecht, 2006/11/24
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!, Erich Schubert, 2006/11/24
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!, Erich Schubert, 2006/11/25
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!, Ronald Lamprecht, 2006/11/25
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!, Erich Schubert, 2006/11/25
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!,
Ronald Lamprecht <=
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!, Erich Schubert, 2006/11/25
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!, Ronald Lamprecht, 2006/11/25
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!, Erich Schubert, 2006/11/25
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!, Erich Schubert, 2006/11/25
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!, Ronald Lamprecht, 2006/11/25
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!, Erich Schubert, 2006/11/25
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!, Metal Snake, 2006/11/25
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!, Ronald Lamprecht, 2006/11/27
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!, Daniel Heck, 2006/11/26
- Re: [Enigma-devel] Re: Enigma 1.00 beta Released!, Erich Schubert, 2006/11/25