X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/disorder/blobdiff_plain/2c7c9eae95f4161c90d270afc9d5f41a37874bba..ef58277111e5066a671948aa19078e392ea48c98:/lib/hex.c diff --git a/lib/hex.c b/lib/hex.c index bd4774a..f37db11 100644 --- a/lib/hex.c +++ b/lib/hex.c @@ -33,6 +33,7 @@ char *hex(const uint8_t *ptr, size_t n) { while(n-- > 0) p += sprintf(p, "%02x", (unsigned)*ptr++); + *p = 0; return buf; }