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
This commit is contained in:
Love Hörnquist Åstrand
2005-04-18 08:28:35 +00:00
parent fca6863ff2
commit 3fcb41496d

View File

@@ -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);