aboutsummaryrefslogtreecommitdiff
path: root/src/postamble.js
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2014-06-17 13:48:39 -0700
committerAlon Zakai <alonzakai@gmail.com>2014-06-17 13:48:39 -0700
commitd54f3a7b86e2b266cc86341b6e06096dc7f04d5e (patch)
tree62c01ecce139b654f0a84060238aec9d130d0be7 /src/postamble.js
parent95404d0d0ebb71d323fad135e9a9bb9981c12808 (diff)
support argv[0] containing the script node is running; fixes #2431
Diffstat (limited to 'src/postamble.js')
-rw-r--r--src/postamble.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/postamble.js b/src/postamble.js
index b90049bc..94b88d4e 100644
--- a/src/postamble.js
+++ b/src/postamble.js
@@ -56,7 +56,7 @@ Module['callMain'] = Module.callMain = function callMain(args) {
argv.push(0);
}
}
- var argv = [allocate(intArrayFromString("/bin/this.program"), 'i8', ALLOC_NORMAL) ];
+ var argv = [allocate(intArrayFromString(Module['thisProgram'] || '/bin/this.program'), 'i8', ALLOC_NORMAL) ];
pad();
for (var i = 0; i < argc-1; i = i + 1) {
argv.push(allocate(intArrayFromString(args[i]), 'i8', ALLOC_NORMAL));