Fixed default value for delay in PngAnimatedBitmap

This commit is contained in:
Marc Lequime
2020-09-16 09:41:38 +01:00
parent 6979fb056b
commit 5367cc475f

View File

@@ -67,7 +67,8 @@ class PngAnimatedBitmap
if file.split(/[\\\/]/)[-1][/^\[(\d+)(?:,(\d+))?]/] # Starts with 1 or more digits in brackets
# File has a frame count
numFrames = $1.to_i
delay = $2.to_i || 10
delay = $2.to_i
delay = 10 if delay == 0
raise "Invalid frame count in #{file}" if numFrames<=0
raise "Invalid frame delay in #{file}" if delay<=0
if panorama.width % numFrames != 0