aboutsummaryrefslogtreecommitdiff
path: root/src/postamble.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/postamble.js')
-rw-r--r--src/postamble.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/postamble.js b/src/postamble.js
index 1329a1a4..07fe1d2e 100644
--- a/src/postamble.js
+++ b/src/postamble.js
@@ -23,7 +23,11 @@ function run(args) {
_main(argc, argv);
while( __ATEXIT__.length > 0) {
- __ATEXIT__.pop()();
+ var func = __ATEXIT__.pop();
+ if (typeof func === 'number') {
+ func = FUNCTION_TABLE[func];
+ }
+ func();
}
}