We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 047098a commit 8d8f37dCopy full SHA for 8d8f37d
src/graphx/graphx.asm
@@ -388,10 +388,12 @@ gfx_AllocSprite:
388
inc de ; de = width * height + 2
389
push de
390
call _indcallHL ; hl = malloc(width * height + 2)
391
- pop de ; de = width * height + 2
392
- add hl, de ; this should never carry
393
- sbc hl, de ; check if malloc failed (hl == 0)
394
- pop de ; e = width, d = height
+ pop de
+ pop de ; e = width, d = height, ude = unknown
+ ; check if malloc failed (hl == 0)
+ add hl, de
395
+ or a, a
396
+ sbc hl, de
397
ret z ; abort if malloc failed
398
ld (hl), de ; store width and height
399
ret
0 commit comments