[Freeciv-tickets] [freeciv] #45689: sdl2: redraw_ibutton() return value

Back to archive index
OSDN Ticket System norep****@osdn*****
Fri Jan 6 07:41:28 JST 2023


#45689: sdl2: redraw_ibutton() return value

  Open Date: 2022-09-23 07:00
Last Update: 2023-01-06 00:41

URL for this Ticket:
    https://osdn.net//projects/freeciv/ticket/45689
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45689

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2023-01-06 00:41 Updated by: cazfi
 * Status Update from Open to Closed
 * Resolution Update from Accepted to Fixed


---------------------------------------------------------------------
Ticket Status:

      Reporter: cazfi
         Owner: cazfi
          Type: Bugs
        Status: Closed
      Priority: 5 - Medium
     MileStone: 3.0.6
     Component: SDL2-client
      Severity: 5 - Medium
    Resolution: Fixed
---------------------------------------------------------------------

Ticket details:

redraw_ibutton() header says: "function return (-1) if there are no Icon nor Text. Else return 0."
In reality there's also a return like this:
ret = alphablit(pIcon, NULL, pIButton->dst->surface, &dest, 255);
if (ret) {
FREESURFACE(pText);
return ret - 10;
}
I guess that should return just '-1'. As any non-zero alphablit() return value is considered an error, above can even result in 10 - 10 = 0, like there was no error at all from redraw_ibutton()
Further, there's another alphablit() call where the success is not checked at all.

-- 
Ticket information of Freeciv project
Freeciv Project is hosted on OSDN

Project URL: https://osdn.net/projects/freeciv/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/freeciv/ticket/45689
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=12505&tid=45689



More information about the Freeciv-tickets mailing list
Back to archive index