Skip to content

Commit

Permalink
Make sure kCharLookupTable is indexed by unsigned char instead of sig… (
Browse files Browse the repository at this point in the history
  • Loading branch information
jasnell authored Oct 18, 2024
1 parent ee83327 commit c400fdd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/workerd/api/util.c++
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ kj::String redactUrl(kj::StringPtr url) {
};

for (const char& c: url) {
uint8_t lookup = kCharLookupTable[c];
uint8_t lookup = kCharLookupTable[static_cast<const kj::byte>(c)];
bool isSep = lookup & CharAttributeFlag::SEPARATOR;
bool isAlphaUpper = lookup & CharAttributeFlag::UPPER_CASE;
bool isAlphaLower = lookup & CharAttributeFlag::LOWER_CASE;
Expand Down

0 comments on commit c400fdd

Please sign in to comment.