summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scan_urlencoded_query.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/scan_urlencoded_query.c b/scan_urlencoded_query.c
index f61d79e..a11b65c 100644
--- a/scan_urlencoded_query.c
+++ b/scan_urlencoded_query.c
@@ -25,10 +25,10 @@ static const unsigned char is_unreserved[256] = {
25 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 25 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
26}; 26};
27 27
28static unsigned char fromhex(unsigned char c) { 28static unsigned char fromhex(unsigned char x) {
29 if (c>='0' && c<='9') return c-'0'; 29 x-='0'; if( x<=9) return x;
30 c &= 0xdf; /* Toggle off lower case bit */ 30 x&=~0x20; x-='A'-'0';
31 if (c>='A' && c<='F') return c-'A'+10; 31 if( x<6 ) return x+10;
32 return 0xff; 32 return 0xff;
33} 33}
34 34