mirror of
https://github.com/transmission/transmission
synced 2024-12-25 01:03:01 +00:00
Avoid assert on passing negative values to isprint
(due to type promotion)
This commit is contained in:
parent
2b5a03a88c
commit
ba7ea94c7d
1 changed files with 1 additions and 1 deletions
|
@ -457,7 +457,7 @@ tr_clientForId (char * buf, size_t buflen, const void * id_in)
|
|||
char out[32], *walk=out;
|
||||
const char *in, *in_end;
|
||||
for (in= (const char*)id, in_end=in+8; in!=in_end; ++in) {
|
||||
if (isprint (*in))
|
||||
if (isprint ((unsigned char) *in))
|
||||
*walk++ = *in;
|
||||
else {
|
||||
tr_snprintf (walk, out+sizeof (out)-walk, "%%%02X", (unsigned int)*in);
|
||||
|
|
Loading…
Reference in a new issue