From 46a422b7e46fa7ff2cd78eca28657eb4843756a2 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Tue, 21 Feb 2023 15:50:28 -0500 Subject: [PATCH] fix: update no_scheme to exit properly --- src/parser.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parser.cpp b/src/parser.cpp index fde7f2d1f..183ba2f02 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -126,7 +126,7 @@ namespace ada::parser { case ada::state::NO_SCHEME: { ada_log("NO_SCHEME ", helpers::substring(url_data, input_position)); // If base is null, or base has an opaque path and c is not U+0023 (#), validation error, return failure. - if (base_url == nullptr || (base_url->has_opaque_path && (input_position != input_size))) { + if (base_url == nullptr || (base_url->has_opaque_path && (url_data[input_position] != '#'))) { ada_log("NO_SCHEME validation error"); url.is_valid = false; return url;