File tree 2 files changed +6
-8
lines changed
2 files changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -375,8 +375,7 @@ namespace url {
375
375
}
376
376
377
377
// First, we have to percent decode
378
- if (PercentDecode (input, length, &decoded) < 0 )
379
- goto end;
378
+ PercentDecode (input, length, &decoded);
380
379
381
380
// If there are any invalid UTF8 byte sequences, we have to fail.
382
381
// Unfortunately this means iterating through the string and checking
Original file line number Diff line number Diff line change @@ -376,11 +376,11 @@ static inline unsigned hex2bin(const char ch) {
376
376
return static_cast <unsigned >(-1 );
377
377
}
378
378
379
- static inline int PercentDecode (const char * input,
380
- size_t len,
381
- std::string* dest) {
379
+ static inline void PercentDecode (const char * input,
380
+ size_t len,
381
+ std::string* dest) {
382
382
if (len == 0 )
383
- return 0 ;
383
+ return ;
384
384
dest->reserve (len);
385
385
const char * pointer = input;
386
386
const char * end = input + len;
@@ -399,11 +399,10 @@ static inline int PercentDecode(const char* input,
399
399
unsigned a = hex2bin (pointer[1 ]);
400
400
unsigned b = hex2bin (pointer[2 ]);
401
401
char c = static_cast <char >(a * 16 + b);
402
- *dest += static_cast < char >(c) ;
402
+ *dest += c ;
403
403
pointer += 3 ;
404
404
}
405
405
}
406
- return 0 ;
407
406
}
408
407
409
408
#define SPECIALS (XX ) \
You can’t perform that action at this time.
0 commit comments