From 35cb5ea47ced471ae20d7dd87135ad3121e0c272 Mon Sep 17 00:00:00 2001 From: Karol Kosek Date: Thu, 14 Apr 2022 22:53:34 +0200 Subject: [PATCH] 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. --- Userland/Utilities/profile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Utilities/profile.cpp b/Userland/Utilities/profile.cpp index d4e28000383..d213228e96b 100644 --- a/Userland/Utilities/profile.cpp +++ b/Userland/Utilities/profile.cpp @@ -107,7 +107,7 @@ ErrorOr 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));