Skip to content
Snippets Groups Projects
Commit e2e385f5 authored by Stephan Bosch's avatar Stephan Bosch
Browse files

Merged concurrent changes.

parents acf7285a b67b1843
No related branches found
No related tags found
No related merge requests found
...@@ -115,7 +115,7 @@ static inline bool _is_qchar(unsigned char c) ...@@ -115,7 +115,7 @@ static inline bool _is_qchar(unsigned char c)
return _qchar_lookup[c]; return _qchar_lookup[c];
} }
static inline int _decode_hex_digit(char digit) static inline int _decode_hex_digit(unsigned char digit)
{ {
switch ( digit ) { switch ( digit ) {
case '0': case '1': case '2': case '3': case '4': case '0': case '1': case '2': case '3': case '4':
...@@ -134,20 +134,25 @@ static inline int _decode_hex_digit(char digit) ...@@ -134,20 +134,25 @@ static inline int _decode_hex_digit(char digit)
static bool _parse_hex_value(const char **in, char *out) static bool _parse_hex_value(const char **in, char *out)
{ {
char value; int value, digit;
if ( **in == '\0' || (value=_decode_hex_digit(**in)) < 0 ) if ( (digit=_decode_hex_digit((unsigned char) **in)) < 0 )
return FALSE; return FALSE;
*out = value << 4; value = digit << 4;
(*in)++; (*in)++;
if ( **in == '\0' || (value=_decode_hex_digit(**in)) < 0 ) if ( (digit=_decode_hex_digit((unsigned char) **in)) < 0 )
return FALSE; return FALSE;
*out |= value; value |= digit;
(*in)++; (*in)++;
return (*out != '\0');
if ( value == 0 )
return FALSE;
*out = (char) value;
return TRUE;
} }
/* /*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.