Page 1 of 1

Line, SetLayerStyle, and an too-large X2 value

Posted: Wed Mar 25, 2026 4:39 pm
by Flinx
Due to a bug, I came across a combination of commands that causes SetLayerStyle to freeze (tested on Windows and Linux). While this is easy to fix, it’s not so easy to find in a larger program. Perhaps there’s a way to prevent this.

Code: Select all

@DISPLAY {Layers=True}
SetFormStyle(#ANTIALIAS)
Line(5, 67, 90, 67, #WHITE, {Name="L"})
SetLayerStyle("L", {X2=32772})
Ralf

Re: Line, SetLayerStyle, and an too-large X2 value

Posted: Sat Mar 28, 2026 5:56 pm
by airsoftsoftwair
Probably an algorithmic overflow because your X2 value is slightly above the signed 16-bit integer quantity. I'll fix this, thanks for reporting!