Comment 17 for bug 1735980

Revision history for this message
Jukka Pakarinen (flegu) wrote :

In the Map::set_origin method is said that
"because of the triangle design, we have to take special care about cases where y is changed by an odd number".
In the method there is added +1 to X-coordinate if Y-coordinate of new origin and an immovable are both an odd number. So the added +1 must be removed when doing an undo. I tested this and it worked with the #4.

We get rid of the heap-use-after-free case if we copy the coordines from the new_field_order to the fields_ instead of doing the reset. I used just a for loop and it worked fine.