mirror of
https://github.com/appgurueu/modlib.git
synced 2024-11-19 22:03:45 +01:00
Fix texmod.colorize
crash if ratio
is nil
This commit is contained in:
parent
73640f11d1
commit
5dc6307661
@ -297,7 +297,7 @@ function texmod:colorize(color, ratio)
|
||||
if ratio == "alpha" then
|
||||
assert(color.alpha or 0xFF == 0xFF)
|
||||
else
|
||||
ratio = ratio or color.alpha
|
||||
ratio = ratio or color.alpha or 0xFF
|
||||
assert_uint8(ratio)
|
||||
if color.alpha == ratio then
|
||||
ratio = nil
|
||||
|
Loading…
Reference in New Issue
Block a user