From e07c202b7619fa250adacc7d0ee2c2b94d60140f Mon Sep 17 00:00:00 2001 From: Mike Brady <4265913+mikebrady@users.noreply.github.com> Date: Mon, 7 Feb 2022 12:37:49 +0000 Subject: [PATCH] Quieten a compiler warning -- might not work. --- rtp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rtp.c b/rtp.c index 58e3b227..ad27b29c 100644 --- a/rtp.c +++ b/rtp.c @@ -90,7 +90,7 @@ void check64conversion(const char *prompt, const uint8_t *source, uint64_t value if ((suppress_zeroes == 0) || (source[obfc] != 0)){ if (suppress_zeroes != 0) { if (source[obfc] < 0x10) { - snprintf(obfp, 2, "%1x", source[obfc]); + snprintf(obfp, 3, "%1x", source[obfc]); obfp+=1; } else { snprintf(obfp, 3, "%02x", source[obfc]); @@ -121,7 +121,7 @@ void check32conversion(const char *prompt, const uint8_t *source, uint32_t value if ((suppress_zeroes == 0) || (source[obfc] != 0)){ if (suppress_zeroes != 0) { if (source[obfc] < 0x10) { - snprintf(obfp, 2, "%1x", source[obfc]); + snprintf(obfp, 3, "%1x", source[obfc]); obfp+=1; } else { snprintf(obfp, 3, "%02x", source[obfc]);