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.
This commit is contained in:
Karol Kosek 2022-04-14 22:53:34 +02:00 committed by Andreas Kling
parent 00782d9a59
commit 35cb5ea47c
Notes: sideshowbarker 2024-07-17 11:42:36 +09:00

View file

@ -107,7 +107,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
return 0;
}
auto cmd_parts = String(cmd_argument).split_view(' ');
auto cmd_parts = StringView(cmd_argument).split_view(' ');
dbgln("Enabling profiling for PID {}", getpid());
TRY(Core::System::profiling_enable(getpid(), event_mask));