strip_unprintable: clarify type conversion
This type conversion is more easily shown to work as intended than the
conversion introduced in 9dcb9e169
.
This commit is contained in:
parent
9dcb9e1696
commit
12b3a184bc
1 changed files with 4 additions and 4 deletions
|
@ -83,9 +83,9 @@ strip_colour(char *string)
|
||||||
static inline char *
|
static inline char *
|
||||||
strip_unprintable(char *string)
|
strip_unprintable(char *string)
|
||||||
{
|
{
|
||||||
unsigned char *c = (unsigned char *)string;
|
char *c = string;
|
||||||
unsigned char *c2 = (unsigned char *)string;
|
char *c2 = string;
|
||||||
unsigned char *last_non_space = NULL;
|
char *last_non_space = NULL;
|
||||||
|
|
||||||
/* c is source, c2 is target */
|
/* c is source, c2 is target */
|
||||||
for(; c && *c; c++)
|
for(; c && *c; c++)
|
||||||
|
@ -109,7 +109,7 @@ strip_unprintable(char *string)
|
||||||
*c2++ = *c;
|
*c2++ = *c;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (*c < 32)
|
if ((unsigned char)*c < 32)
|
||||||
break;
|
break;
|
||||||
*c2++ = *c;
|
*c2++ = *c;
|
||||||
last_non_space = c2;
|
last_non_space = c2;
|
||||||
|
|
Loading…
Reference in a new issue