changeset 6767:bf0499be7213

fix unit tests
author Alain Mazy <am@orthanc.team>
date Mon, 11 May 2026 18:25:51 +0200
parents 1e3cecbb1310
children ca9a86f8755b 271c0a3ae375
files OrthancFramework/Sources/Toolbox.cpp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/OrthancFramework/Sources/Toolbox.cpp	Mon May 11 18:16:04 2026 +0200
+++ b/OrthancFramework/Sources/Toolbox.cpp	Mon May 11 18:25:51 2026 +0200
@@ -3022,7 +3022,7 @@
 
     for (size_t i = 0; i < converted.size(); i++)
     {
-      char c = converted[i];
+      unsigned char c = converted[i];
       bool allowRepetitions = true;
 
       if (isspace(c) ||
@@ -3058,14 +3058,14 @@
 
       if (allowRepetitions)
       {
-        result.push_back(c);
+        result.push_back(static_cast<char>(c));
       }
       else
       {
         if (result.empty() ||
-            result[result.size() - 1] != c)
+            result[result.size() - 1] != static_cast<char>(c))
         {
-          result.push_back(c);
+          result.push_back(static_cast<char>(c));
         }
       }
     }