You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found out, that this is probably due to an error in DupSprite() in spritecache.cpp:
void DupSprite(SpriteID old_spr, SpriteID new_spr)
{
SpriteCache *scold = GetSpriteCache(old_spr);
SpriteCache *scnew = AllocateSpriteCache(new_spr);
...
}
The call to AllocateSpriteCache may reallocate the _spritecache array letting scold point to invalid memory. Swapping these two lines should solve the issue (see attached patch). This seems to be the only place in the code, that has this problem.
PhilSophus opened the ticket and wrote:
Attachments
Reported version: trunk
Operating system: All
This issue was imported from FlySpray: https://bugs.openttd.org/task/1717
The text was updated successfully, but these errors were encountered: