Commit d44d9809 authored by Bas Lijnse's avatar Bas Lijnse
Browse files

Fixed offset bug in http_urldecode

parent e270f8cd
...@@ -40,7 +40,7 @@ where ...@@ -40,7 +40,7 @@ where
hexToDigit :: !Int -> Int hexToDigit :: !Int -> Int
hexToDigit i hexToDigit i
| i<=toInt '9' = i - toInt '0' | i<=toInt '9' = i - toInt '0'
| otherwise = i - toInt 'A' - 10 | otherwise = 10 + (i - toInt 'A')
urlDecode` ['+':xs] = [' ':urlDecode` xs] urlDecode` ['+':xs] = [' ':urlDecode` xs]
urlDecode` [x:xs] = [x:urlDecode` xs] urlDecode` [x:xs] = [x:urlDecode` xs]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment