mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-21 17:56:47 +00:00
Fix formatting bug in strbuf_toprint() et al
Was printing chars above \x7f as \xffffffhh.
This commit is contained in:
parent
ebf2aa83ac
commit
46f81d9d2e
@ -38,7 +38,7 @@ static inline strbuf _toprint(strbuf sb, char c)
|
|||||||
else if (c >= ' ' && c <= '~')
|
else if (c >= ' ' && c <= '~')
|
||||||
strbuf_putc(sb, c);
|
strbuf_putc(sb, c);
|
||||||
else
|
else
|
||||||
strbuf_sprintf(sb, "\\x%02x", c);
|
strbuf_sprintf(sb, "\\x%02x", (unsigned char) c);
|
||||||
return sb;
|
return sb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user