[exim-cvs] Debug: fix coding for signedness

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Exim Git Commits Mailing List
Ημερομηνία:  
Προς: exim-cvs
Αντικείμενο: [exim-cvs] Debug: fix coding for signedness
Gitweb: https://git.exim.org/exim.git/commitdiff/e89891fa5e27a1a6f895f45d324f2b407c41539b
Commit:     e89891fa5e27a1a6f895f45d324f2b407c41539b
Parent:     2d75f09c2df079365b0fc2c9fb22a130c9267611
Author:     Andrew Aitchison <exim@???>
AuthorDate: Wed Sep 4 21:37:57 2024 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Wed Sep 4 21:37:57 2024 +0100


    Debug: fix coding for signedness


    Broken-by: 2d75f09c2df0
---
 src/src/string.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)


diff --git a/src/src/string.c b/src/src/string.c
index f652b3815..2b62233d8 100644
--- a/src/src/string.c
+++ b/src/src/string.c
@@ -1687,11 +1687,14 @@ while (*fp)
         case '{' : zg = string_catn(zg, US"{BO}", 4); break;
         case '}' : zg = string_catn(zg, US"{BC}", 4); break;
         default:
-          if ( (*s < 32) || (*s > 127) )
-        zg = string_fmt_append(zg, "{%02x}", *s);
+          {
+          unsigned char u = *s;
+          if ( (u < 32) || (u > 127) )
+        zg = string_fmt_append(zg, "{%02x}", u);
           else
         zg = string_catn(zg, US s, 1);
           break;
+          }
         }
     if (zg) { s = CS zg->s; precision = slen = gstring_length(zg); }
     else    { s = "";    slen = 0; }


--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-cvs.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-cvs-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/