Description:
Fix crash caused by going off the map.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -233,6 +233,6 | |||||
|
233 | May be due to a quirk of my Linux setup |
|
233 | May be due to a quirk of my Linux setup |
|
234 | - Drawing error when clicking sometimes on main screen. @done(2022-04-27) |
|
234 | - Drawing error when clicking sometimes on main screen. @done(2022-04-27) |
|
235 | Tries to draw area? |
|
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 | var newSquares = new List<Vector2>(); |
|
137 | var newSquares = new List<Vector2>(); |
|
138 |
|
138 | ||
|
139 | var end_x = MathUtils.Clamp(message.End.X, 0.0f, this.Map.MapWidth); |
|
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); |
|
140 | var end_y = MathUtils.Clamp(message.End.Y, 0.0f, this.Map.MapHeight-1); |
|
141 |
|
141 | ||
|
142 | foreach (var i in step_until(area.squares[0].X, end_x)) { |
|
142 | foreach (var i in step_until(area.squares[0].X, end_x)) { |
|
143 | foreach (var j in step_until(area.squares[0].Y, end_y)) { |
|
143 | foreach (var j in step_until(area.squares[0].Y, end_y)) { |
You need to be logged in to leave comments.
Login now