enigma-devel
[Top][All Lists]
Advanced

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

Re: [Enigma-devel] Annother patch


From: Ronald Lamprecht
Subject: Re: [Enigma-devel] Annother patch
Date: Fri, 26 May 2006 17:52:30 +0200
User-agent: Mozilla Thunderbird 1.0.7 (Windows/20050923)

Hi Tacvek,

Tacvek wrote:
Much of the code is simply a copy and paste from the next function in the file.


Index: models.lua
===================================================================
--- models.lua (revision 135)
+++ models.lua (working copy)
@@ -297,7 +297,12 @@

function def_anim_images(name, frames, opt)
    opt = opt or {}
-    display.DefineAnim(name, opt.loop)
+    if loop then
+        if opt.loop==0 then loopbool=false else loopbool=true end
+    else
+        loopbool=false
+    end
+    display.DefineAnim(name, loopbool)
    for i=1,getn(frames) do
 local frame=frames[i]
 opt.filename = frame[1]


The "if loop then" is an obviously copy error. It causes bug report #7585 "laser and laserswitch".

It looks like Lua does not provide a secure check for a table index availibility. In this case I hope "if opt.loop~=nil then" will do it - at least it seems to fix bug #7585.

If no one knows a better fix I will commit it.

- Ronald




reply via email to

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