Attnam / ivan

Iter Vehemens ad Necem - a continuation of the graphical roguelike by members of http://attnam.com
GNU General Public License v2.0
306 stars 42 forks source link

bitmap::DrawLine() may draw outside it's boundaries when the Wide line option is enabled causing SEGFAULT #590

Open AquariusPower opened 4 years ago

AquariusPower commented 4 years ago

It was happening when the minimap is drawn too near the top screen edge, and we hover the mouse over the top mapNote. That would draw a wide white line, but the line would be drawn outside the game gfx buffer (Y<0) and it would SEGFAULT, I workaround it by preventing the minimap being drawn before x=10 or before y=10.

The proper fix would be that bitmap::DrawLine() should actually check if it is drawing outside it's boundaries mainly when Wide mode is enabled!