about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/pamela/pamela_query_string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pamela/pamela_query_string.c b/src/pamela/pamela_query_string.c
index 27c131f..978940d 100644
--- a/src/pamela/pamela_query_string.c
+++ b/src/pamela/pamela_query_string.c
@@ -14,7 +14,7 @@ int pamela_query_string (pamela_t *a, char const *s, size_t len, stralloc *sa)
   if (textmessage_timed_receive(&a->in, &v, 0, 0) <= 0) return 0 ;
   if (!v.iov_len) return (errno = EPROTO, 0) ;
   s = v.iov_base ;
-  if (s[0]) return (errno = s[0], 0) ;
+  if (s[0]) return (errno = (unsigned char)s[0], 0) ;
   if (!stralloc_catb(sa, s + 1, v.iov_len - 1)) return 0 ;
   return 1 ;
 }