only append extra_args if it's defined

Otherwise Emscripten's JS chokes; it assumes that every element of the
argv array is a string, and converts them into an array of bytes for
the running program to use. Fixes #28.
This commit is contained in:
Daniel Brooks
2018-02-10 11:21:07 -08:00
parent 9258bf80fa
commit 94035eb203
+3 -1
View File
@@ -682,7 +682,9 @@ var Module = null;
}
}
args = args.concat(extra_args);
if (extra_args) {
args = args.concat(extra_args);
}
var path = emulator_start.split(/\\|\//); // I have LTS already
args.push('-c', /^[a-zA-Z]:$/.test(path[0]) ? path.shift() : 'c:');