summary refs log tree commit diff stats
path: root/types.h
diff options
context:
space:
mode:
authorAli Fardan <raiz@stellarbound.space>2020-11-23 09:56:37 +0300
committerAli Fardan <raiz@stellarbound.space>2020-11-23 09:56:37 +0300
commitfaabb55313f176c52897cf63623ecb5b158ec46d (patch)
treefedc77d0be9f47c2e9459b4c83b08c661d8e4bcb /types.h
parent5a66aa1bbace4775025cd99a8ab0a8a18487dfe9 (diff)
downloadlibyuri-faabb55313f176c52897cf63623ecb5b158ec46d.tar.gz
decode: fix percent encoded first character parser bug
Diffstat (limited to 'types.h')
-rw-r--r--types.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/types.h b/types.h
index 03208d4..4bfc84b 100644
--- a/types.h
+++ b/types.h
@@ -102,7 +102,14 @@
 	(_is_unreserved(c) ||\
 	 _is_sub_delim(c)  ||\
 	 (c == ':')        ||\
-	 (c == '@'))
+	 (c == '@')        ||\
+	 (c == '%'))
+
+#define _is_userinfo(c)\
+	(_is_unreserved(c) ||\
+	 _is_sub_delim(c)  ||\
+	 (c == ':')        ||\
+	 (c == '%'))
 
 #define _is_segment(c)\
 	_is_pchar(c)
@@ -110,4 +117,6 @@
 #define _is_segment_nc(c)\
 	(_is_unreserved(c) ||\
 	 _is_sub_delim(c)  ||\
-	 (c == '@'))
+	 (c == '@')        ||\
+	 (c == '%'))
+