Copy over unsigned char fix.
[shibboleth/cpp-opensaml.git] / saml / binding / impl / URLEncoder.cpp
index 81f0a51..92a7858 100644 (file)
@@ -67,8 +67,8 @@ string URLEncoder::encode(const char* s) const
     for (; *s; s++) {
         if (isBad(*s)) {
             ret+='%';
-            ret+=hexchar(*s >> 4);
-            ret+=hexchar(*s & 0x0F);
+            ret+=hexchar((unsigned char)*s >> 4);
+            ret+=hexchar((unsigned char)*s & 0x0F);
         }
         else
             ret+=*s;