Skip to content

Commit

Permalink
[KERNAL] fix crash in FB_set_pixels for count>255. Fixes #179 (#180)
Browse files Browse the repository at this point in the history
  • Loading branch information
irmen committed Mar 26, 2021
1 parent 48cca6f commit ffd2e5f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions kernal/drivers/x16/framebuffer.s
Expand Up @@ -176,7 +176,12 @@ FB_get_pixel:
FB_set_pixels:
PushB r0H
PushB r1H
jsr set_pixels_FG
PopB r1H
PopB r0H
rts

set_pixels_FG:
lda r1H
beq @a

Expand All @@ -193,8 +198,6 @@ FB_set_pixels:
iny
dex
bne :-
PopB r1H
PopB r0H
rts

;---------------------------------------------------------------
Expand Down

0 comments on commit ffd2e5f

Please sign in to comment.