Skip to content

Commit 993b3c4

Browse files
ZERICO2005mateoconlechuga
authored andcommitted
swapped order of atexit and free
1 parent ec281e8 commit 993b3c4

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

src/crt/crt0.S

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -367,14 +367,11 @@ _exit:
367367
push de ; arg
368368
push hl ; exit status
369369
ld hl, (ix + 1 * 3) ; func
370-
push hl ; func
371-
push ix
372-
call _free
373-
pop bc ; reset SP
374-
pop hl ; func
375370
; atexit : void (*func)(void)
376371
; on_exit : void (*func)(int status, void *arg)
377372
call __indcallhl
373+
ex (sp), ix
374+
call _free
378375
pop bc ; reset SP
379376
pop bc ; reset SP
380377
.L.exit_function_start:

0 commit comments

Comments
 (0)