[Freeciv-Dev] (PR#12525) gui-win32: obscure cache bug
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=12525 >
I encountered a strange bug in the bitmap cache in graphics.c, where if
a sprite's bitmap is placed in the first cache position, then freed,
then a new sprite is created, there is a chance that the new sprite will
have a bitmap created at the same address as the first sprite's, and
thus the cache will think that the bitmap is already cached. This patch
initializes the cache ids of a new sprite to -1, to prevent such an
event from happening.
This patch also fixes canvas_put_sprite(), as it didn't crop the sprite
before placing it on the canvas.
-James Canete
win32-cachefix.diff
Description: Binary data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#12525) gui-win32: obscure cache bug,
James Canete <=
|
|