mirror of
https://github.com/nodejs/node.git
synced 2026-11-25 23:01:06 -05:00
src: fix -Wreturn-stack-address error
PR-URL: https://github.com/nodejs/node/pull/58439 Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
This commit is contained in:
1 parent
79b852a692
commit
440d4f42bd
1 file changed
+1
-1
@@ -23,7 +23,7 @@ std::optional<std::string_view> ConfigReader::GetDataFromArgs(
|
||||
} else if (it->starts_with(flag_path)) {
|
||||
// Case: "--experimental-config-file=foo"
|
||||
if (it->size() > flag_path.size() && (*it)[flag_path.size()] == '=') {
|
||||
return it->substr(flag_path.size() + 1);
|
||||
return std::string_view(*it).substr(flag_path.size() + 1);
|
||||
}
|
||||
} else if (*it == default_file || it->starts_with(default_file)) {
|
||||
has_default_config_file = true;
|
||||
|
||||
Reference in new issue
Block a user