Amiga: fix three latent bugs found in code review

amiv_lprint_glyph used uninitialized 'base'; amii_clear_nhwindow
compared cw->type to a winid; amii_sethipens fell through.
This commit is contained in:
Ingo Paschke
2026-05-11 20:29:47 +02:00
parent a583201f15
commit f8ea34489f
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -563,7 +563,7 @@ amiv_flush_glyph_buffer(struct Window *vw)
void
amiv_lprint_glyph(winid window, int color_index, int glyph)
{
int base;
int base = 0;
struct amii_WinDesc *cw;
struct Window *w;
int curx;
+2 -1
View File
@@ -1354,6 +1354,7 @@ amii_sethipens(struct Window *w, int type, int attr)
case NHW_TEXT:
SetAPen(w->RPort, attr ? C_BLACK : amii_textAPen);
SetBPen(w->RPort, amii_textBPen);
break;
case -2:
SetBPen(w->RPort, amii_otherBPen);
SetAPen(w->RPort, attr ? C_RED : amii_otherAPen);
@@ -1445,7 +1446,7 @@ amii_clear_nhwindow(winid win)
/* Clear the overview window too if it is displayed */
if (WINVERS_AMIV
&& (cw->type == WIN_MAP && WIN_OVER != WIN_ERR && reclip == 0)) {
&& (cw->type == NHW_MAP && WIN_OVER != WIN_ERR && reclip == 0)) {
amii_clear_nhwindow(WIN_OVER);
}