Skip to content

Commit 35cb5ea

Browse files
krkkawesomekling
authored andcommitted
Utilities/profile: Call split_view() using StringView for command parts
This fixes the always appearing 'No such file' error when using the -c flag, as the String was deconstructed right after running this line.
1 parent 00782d9 commit 35cb5ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Userland/Utilities/profile.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
107107
return 0;
108108
}
109109

110-
auto cmd_parts = String(cmd_argument).split_view(' ');
110+
auto cmd_parts = StringView(cmd_argument).split_view(' ');
111111

112112
dbgln("Enabling profiling for PID {}", getpid());
113113
TRY(Core::System::profiling_enable(getpid(), event_mask));

0 commit comments

Comments
 (0)