Skip to content

Commit 0cf86ec

Browse files
authored
Fix SDL range check (#8)
Close #6
1 parent 48b9001 commit 0cf86ec

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

syscall_sdl.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void syscall_draw_frame_pal(struct riscv_t *rv)
103103
uint32_t *d = pixels_ptr;
104104
const uint8_t *p = i;
105105
for (size_t y = 0; y < height; ++y) {
106-
for (size_t x = 0; x < height; ++x) {
106+
for (size_t x = 0; x < width; ++x) {
107107
const uint8_t c = p[x];
108108
const uint8_t *lut = j + (c * 3);
109109
d[x] = (lut[0] << 16) | (lut[1] << 8) | lut[2];

0 commit comments

Comments
 (0)