Skip to content

Commit 4e9ffc5

Browse files
authored
When checking for forbidden code points, we should process constant values (duh). (#321)
1 parent 36b94b6 commit 4e9ffc5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/ada/unicode.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ ada_really_inline constexpr bool is_forbidden_host_code_point(
8686
* @see https://url.spec.whatwg.org/#forbidden-domain-code-point
8787
*/
8888
ada_really_inline constexpr bool contains_forbidden_domain_code_point(
89-
char* input, size_t length) noexcept;
89+
const char* input, size_t length) noexcept;
9090

9191
/**
9292
* Checks if the input is a forbidden doamin code point.

src/unicode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ ada_really_inline constexpr bool is_forbidden_domain_code_point(
131131
}
132132

133133
ada_really_inline constexpr bool contains_forbidden_domain_code_point(
134-
char* input, size_t length) noexcept {
134+
const char* input, size_t length) noexcept {
135135
size_t i = 0;
136136
uint8_t accumulator{};
137137
for (; i + 4 <= length; i += 4) {

0 commit comments

Comments
 (0)