Description:
Fix crash caused by going off the map.
Commit status:
[Not Reviewed]
References:
Comments:
0 Commit comments 0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
Add another comment

r566:971d4f59fd4e -

@@ -233,6 +233,6
233 233 May be due to a quirk of my Linux setup
234 234 - Drawing error when clicking sometimes on main screen. @done(2022-04-27)
235 235 Tries to draw area?
236 - Crash when extending preserve past bottom.
236 - Crash when extending preserve past bottom. @done(2022-04-27)
237 237
238 238
@@ -136,8 +136,8
136 136
137 137 var newSquares = new List<Vector2>();
138 138
139 var end_x = MathUtils.Clamp(message.End.X, 0.0f, this.Map.MapWidth);
140 var end_y = MathUtils.Clamp(message.End.Y, 0.0f, this.Map.MapHeight);
139 var end_x = MathUtils.Clamp(message.End.X, 0.0f, this.Map.MapWidth-1);
140 var end_y = MathUtils.Clamp(message.End.Y, 0.0f, this.Map.MapHeight-1);
141 141
142 142 foreach (var i in step_until(area.squares[0].X, end_x)) {
143 143 foreach (var j in step_until(area.squares[0].Y, end_y)) {
You need to be logged in to leave comments. Login now