diff options
| -rw-r--r-- | examples/game.c | 2 | ||||
| -rw-r--r-- | examples/notepad.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/game.c b/examples/game.c index 0a8bc18..bb6c729 100644 --- a/examples/game.c +++ b/examples/game.c @@ -76,7 +76,7 @@ static void draw_digit(uint32_t *pix, int w, int h, int px, int py, int digit, u for (int y = 0; y < 8; y++) { uint8_t row = glyph[y]; for (int x = 0; x < 8; x++) { - if (row & (1 << x)) { + if (row & (0x80 >> x)) { for (int dy = 0; dy < s; dy++) { int yy = py + y * s + dy; if (yy < 0 || yy >= h) continue; diff --git a/examples/notepad.c b/examples/notepad.c index 250be58..cb2cd61 100644 --- a/examples/notepad.c +++ b/examples/notepad.c @@ -242,7 +242,7 @@ static void draw_char(uint32_t *pixels, int w, int h, int px, int py, char c, ui for (int y = 0; y < 8; y++) { uint8_t row = glyph[y]; for (int x = 0; x < 8; x++) { - if (row & (1 << x)) { + if (row & (0x80 >> x)) { fill_rect(pixels, w, h, px + x * scale, py + y * scale, scale, scale, col); } } |
