summary refs log tree commit diff
diff options
context:
space:
mode:
authorLaurent Bercot <ska-skaware@skarnet.org>2024-02-05 21:09:54 +0000
committerLaurent Bercot <ska@appnovation.com>2024-02-05 21:09:54 +0000
commit228d717d82d3cacc744d756d02401023682a52b6 (patch)
tree68cd22ae60305c538f74c6c77d2f1ae5e48bad50
parent65f09b6b055cd817124b0a5420362c4da9542caa (diff)
downloadtipidee-228d717d82d3cacc744d756d02401023682a52b6.tar.gz
tipidee-228d717d82d3cacc744d756d02401023682a52b6.tar.xz
tipidee-228d717d82d3cacc744d756d02401023682a52b6.zip
char is unsigned on some archs
Signed-off-by: Laurent Bercot <ska@appnovation.com>
-rw-r--r--src/libtipidee/tipidee_uri_parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libtipidee/tipidee_uri_parse.c b/src/libtipidee/tipidee_uri_parse.c
index 6f0064a..eac1bd8 100644
--- a/src/libtipidee/tipidee_uri_parse.c
+++ b/src/libtipidee/tipidee_uri_parse.c
@@ -97,7 +97,7 @@ END = 13, X = 14
 static inline uint8_t uridecode_cclass (char c)
 {
   static uint8_t const table[128] = "01111111111111111111111111111111161162>>>>>=>==4;;;;;;;;;;5>>=>36<<<<<<====================>1>==1<<<<<<=7=======9==:8======111=1" ;
-  return c < 0 ? 1 : table[(uint8_t)c] - '0' ;
+  return c & 0x80 ? 1 : table[(uint8_t)c] - '0' ;
 }
 
 size_t tipidee_uri_parse (char *out, size_t max, char const *in, tipidee_uri *uri)