diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2024-02-05 21:09:54 +0000 |
---|---|---|
committer | Laurent Bercot <ska@appnovation.com> | 2024-02-05 21:09:54 +0000 |
commit | 228d717d82d3cacc744d756d02401023682a52b6 (patch) | |
tree | 68cd22ae60305c538f74c6c77d2f1ae5e48bad50 | |
parent | 65f09b6b055cd817124b0a5420362c4da9542caa (diff) | |
download | tipidee-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.c | 2 |
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) |