diff --git a/lang/cem/libcc.ansi/sys/exit/exit.c b/lang/cem/libcc.ansi/sys/exit/exit.c index 7f861321f..d16db6c3b 100644 --- a/lang/cem/libcc.ansi/sys/exit/exit.c +++ b/lang/cem/libcc.ansi/sys/exit/exit.c @@ -15,8 +15,8 @@ int __funccnt = 0; void exit(int status) { /* "Called in reversed order of their registration" */ - while (__funccnt >= 0) - (*__functab[__funccnt])(); + while (__funccnt) + (*__functab[--__funccnt])(); _exit(status); }