From 3fcb41496d695063d64f847592ca963127aee65a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 18 Apr 2005 08:28:35 +0000 Subject: [PATCH] cast to unsigned char to make sure its not negative when passing it to is* functions git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@14823 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/roken/unvis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/roken/unvis.c b/lib/roken/unvis.c index 3cf32b603..8c9ee96f8 100644 --- a/lib/roken/unvis.c +++ b/lib/roken/unvis.c @@ -262,7 +262,7 @@ strunvis(char *dst, const char *src) while ((c = *src++) != '\0') { again: - switch (unvis(dst, c, &state, 0)) { + switch (unvis(dst, (unsigned char)c, &state, 0)) { case UNVIS_VALID: dst++; break; @@ -276,7 +276,7 @@ strunvis(char *dst, const char *src) return (-1); } } - if (unvis(dst, c, &state, UNVIS_END) == UNVIS_VALID) + if (unvis(dst, (unsigned char)c, &state, UNVIS_END) == UNVIS_VALID) dst++; *dst = '\0'; return (dst - start);