diff --git a/src/node_options-inl.h b/src/node_options-inl.h index 1ebe7ca405fd2d..ffc39a23b13378 100644 --- a/src/node_options-inl.h +++ b/src/node_options-inl.h @@ -444,7 +444,8 @@ void OptionsParser::Parse( *Lookup(info.field, options) = std::atoll(value.c_str()); break; case kUInteger: - *Lookup(info.field, options) = std::stoull(value); + *Lookup(info.field, options) = + std::strtoull(value.c_str(), nullptr, 10); break; case kString: *Lookup(info.field, options) = value; diff --git a/test/sequential/test-cpu-prof-invalid-options.js b/test/sequential/test-cpu-prof-invalid-options.js index b5f7619cdac0d8..d63716941f78cf 100644 --- a/test/sequential/test-cpu-prof-invalid-options.js +++ b/test/sequential/test-cpu-prof-invalid-options.js @@ -58,11 +58,11 @@ const { } // --cpu-prof-interval without --cpu-prof -{ +for (const arg of [kCpuProfInterval, 'crashme']) { tmpdir.refresh(); const output = spawnSync(process.execPath, [ '--cpu-prof-interval', - kCpuProfInterval, + arg, fixtures.path('workload', 'fibonacci.js'), ], { cwd: tmpdir.path,