diff options
author | Alon Zakai <alonzakai@gmail.com> | 2014-06-17 13:48:39 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2014-06-17 13:48:39 -0700 |
commit | d54f3a7b86e2b266cc86341b6e06096dc7f04d5e (patch) | |
tree | 62c01ecce139b654f0a84060238aec9d130d0be7 /src/postamble.js | |
parent | 95404d0d0ebb71d323fad135e9a9bb9981c12808 (diff) |
support argv[0] containing the script node is running; fixes #2431
Diffstat (limited to 'src/postamble.js')
-rw-r--r-- | src/postamble.js | 2 |
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)); |