You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-action/powermanga/files/powermanga-0.91-segfault.patch

23 lines
877 B

https://bugs.gentoo.org/show_bug.cgi?id=422915
--- src/shots.c
+++ src/shots.c
@@ -490,8 +490,6 @@
{
bullet->img_angle = (Sint16) (bullet->angle / PI_BY_16);
}
- /* save current angle for the calculation of the next angle */
- bullet->img_old_angle = bullet->img_angle;
/* avoid negative indexes */
bullet->img_angle = (Sint16) abs (bullet->img_angle);
/* avoid a shot angle higher than the number of images */
@@ -499,6 +497,8 @@
{
bullet->img_angle = (Sint16) (bullet->spr.numof_images - 1);
}
+ /* save current angle for the calculation of the next angle */
+ bullet->img_old_angle = bullet->img_angle;
/* draw the shot sprite */
draw_sprite (bullet->spr.img[bullet->img_angle],
(Uint32) bullet->spr.xcoord,