[posila] [2.0.14] util.combine_icons() incorrect scaling
Posted: Mon Nov 04, 2024 6:27 pm
I think this worked correctly in all versions of 1.1 I tested, but 2.0.7 and 2.0.14 has it broken.
data/core/lualib/util.lua has the following function:
and has this line:
This incorrect logic, as using this ends up with scale values like 0.0000124, which obviously will fail to render the icon.
The correct line should be
data/core/lualib/util.lua has the following function:
Code: Select all
function util.combine_icons(icons1, icons2, inputs, default_icon_size)
Code: Select all
icon.scale = scale * ((icon_to_add.scale or 32.0) / icon.icon_size)
The correct line should be
Code: Select all
icon.scale = scale * (icon_to_add.scale or (32.0 / icon.icon_size))