Skip to content

Commit 440d4f4

Browse files
codebyteretargos
authored andcommitted
src: fix -Wreturn-stack-address error
PR-URL: #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>
1 parent 79b852a commit 440d4f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/node_config_file.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ std::optional<std::string_view> ConfigReader::GetDataFromArgs(
2323
} else if (it->starts_with(flag_path)) {
2424
// Case: "--experimental-config-file=foo"
2525
if (it->size() > flag_path.size() && (*it)[flag_path.size()] == '=') {
26-
return it->substr(flag_path.size() + 1);
26+
return std::string_view(*it).substr(flag_path.size() + 1);
2727
}
2828
} else if (*it == default_file || it->starts_with(default_file)) {
2929
has_default_config_file = true;

0 commit comments

Comments
 (0)