]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
Quieten a compiler warning -- might not work.
authorMike Brady <4265913+mikebrady@users.noreply.github.com>
Mon, 7 Feb 2022 12:37:49 +0000 (12:37 +0000)
committerMike Brady <4265913+mikebrady@users.noreply.github.com>
Mon, 7 Feb 2022 12:37:49 +0000 (12:37 +0000)
rtp.c

diff --git a/rtp.c b/rtp.c
index 58e3b227649334cda60569d872c182f1092697d9..ad27b29cc7c350122c885e53e26089acc8a88791 100644 (file)
--- 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]);