From 6f0a85f292014a1b4b9fad85dc37e26282257e01 Mon Sep 17 00:00:00 2001 From: Matt McCormick Date: Tue, 30 Aug 2022 23:10:06 -0400 Subject: [PATCH] fix(runPipelineEmscripten): Copy args before passing to callMain Will insert 'this.program' repeatedly into the start of the array. --- src/pipeline/internal/runPipelineEmscripten.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pipeline/internal/runPipelineEmscripten.ts b/src/pipeline/internal/runPipelineEmscripten.ts index fed0c623f..64ae4b07b 100644 --- a/src/pipeline/internal/runPipelineEmscripten.ts +++ b/src/pipeline/internal/runPipelineEmscripten.ts @@ -283,7 +283,7 @@ function runPipelineEmscripten (pipelineModule: PipelineEmscriptenModule, args: pipelineModule.resetModuleStderr() let returnValue = 0 try { - returnValue = pipelineModule.callMain(args) + returnValue = pipelineModule.callMain(args.slice()) } catch (exception) { // Note: Module must be built with CMAKE_BUILD_TYPE set to Debug. // e.g.: itk-wasm build my/project -- -DCMAKE_BUILD_TYPE:STRING=Debug