Skip to content

Commit

Permalink
ADL: Fix uninitialized variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Torbjörn Andersson committed Aug 25, 2024
1 parent 8d04f79 commit 315d633
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions engines/adl/display_a2.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,23 +68,22 @@ class Display_A2 : public Display {
static uint16 getBits(const Display_A2 *display, uint y, uint x) {
const uint charPos = (y >> 3) * kTextWidth + x;
byte m = display->_textBuf[charPos];
byte b;
byte b = _font[m & 0x3f][y % 8];

if (display->_showCursor && charPos == display->_cursorPos) {
if (display->_enableApple2eCursor) {
if (!display->_enableApple2eCursor) {
m = (m & 0x3f) | 0x40;
} else {
if (display->_blink) {
byte cursor[] = {
0x00, 0x00, 0x2a, 0x14,
0x2a, 0x14, 0x2a, 0x00
};

b = cursor[y % 8];
} else
b = _font[m & 0x3f][y % 8];
} else
m = (m & 0x3f) | 0x40;
} else
b = _font[m & 0x3f][y % 8];
}
}
}

if (!(m & 0x80) && (!(m & 0x40) || display->_blink))
b = ~b;
Expand Down

0 comments on commit 315d633

Please sign in to comment.