summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorkleines Filmröllchen <filmroellchen@serenityos.org>2022-06-24 01:07:37 +0200
committerLinus Groh <mail@linusgroh.de>2022-12-11 16:05:23 +0000
commit146bce53dda9ac2bf2633ba950226bddca9dfa51 (patch)
treee7bdfa6930281c9b2c086718b19cbe0877b8aedb /Userland
parenta438c4d568ca4e16164b65e408cdcbba587517f8 (diff)
downloadserenity-146bce53dda9ac2bf2633ba950226bddca9dfa51.zip
Help: Fix search query parsing
This was failing probably because AK::URL was being too strict; and the query emptyness check was flipped.
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Applications/Help/main.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Applications/Help/main.cpp b/Userland/Applications/Help/main.cpp
index 8c6da96286..3ae157664b 100644
--- a/Userland/Applications/Help/main.cpp
+++ b/Userland/Applications/Help/main.cpp
@@ -19,7 +19,7 @@ using namespace Help;
static DeprecatedString parse_input(StringView input)
{
- AK::URL url(input);
+ AK::URL url = URL::create_with_url_or_path(input);
if (url.is_valid())
return url.basename();
@@ -72,7 +72,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
.accept_value = [&](char const* input_ptr) {
StringView input { input_ptr, strlen(input_ptr) };
// If start_page was already set by our section arg, then it can't be set again
- if (start_page.is_empty())
+ if (!start_page.is_empty())
return false;
start_page = parse_input(input);
return true;