소스 검색

AK: Fix urlencode() with high byte values

Previously urlencode() would encode bytes above 127 incorrectly, printing
them as negative hex values.
Conrad Pankoff 4 년 전
부모
커밋
13f13a9e59
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      AK/URLParser.cpp

+ 1 - 1
AK/URLParser.cpp

@@ -93,7 +93,7 @@ static inline bool in_userinfo_set(u32 c)
 String urlencode(const StringView& input)
 {
     StringBuilder builder;
-    for (char ch : input) {
+    for (unsigned char ch : input) {
         if (in_userinfo_set((u8)ch)) {
             builder.append('%');
             builder.appendff("{:02X}", ch);