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:
+1
-1
@@ -563,7 +563,7 @@ amiv_flush_glyph_buffer(struct Window *vw)
|
|||||||
void
|
void
|
||||||
amiv_lprint_glyph(winid window, int color_index, int glyph)
|
amiv_lprint_glyph(winid window, int color_index, int glyph)
|
||||||
{
|
{
|
||||||
int base;
|
int base = 0;
|
||||||
struct amii_WinDesc *cw;
|
struct amii_WinDesc *cw;
|
||||||
struct Window *w;
|
struct Window *w;
|
||||||
int curx;
|
int curx;
|
||||||
|
|||||||
@@ -1354,6 +1354,7 @@ amii_sethipens(struct Window *w, int type, int attr)
|
|||||||
case NHW_TEXT:
|
case NHW_TEXT:
|
||||||
SetAPen(w->RPort, attr ? C_BLACK : amii_textAPen);
|
SetAPen(w->RPort, attr ? C_BLACK : amii_textAPen);
|
||||||
SetBPen(w->RPort, amii_textBPen);
|
SetBPen(w->RPort, amii_textBPen);
|
||||||
|
break;
|
||||||
case -2:
|
case -2:
|
||||||
SetBPen(w->RPort, amii_otherBPen);
|
SetBPen(w->RPort, amii_otherBPen);
|
||||||
SetAPen(w->RPort, attr ? C_RED : amii_otherAPen);
|
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 */
|
/* Clear the overview window too if it is displayed */
|
||||||
if (WINVERS_AMIV
|
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);
|
amii_clear_nhwindow(WIN_OVER);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user