SAML 1.x SSO assertion validator.
[shibboleth/cpp-opensaml.git] / saml / binding / impl / URLEncoder.cpp
index 81f0a51..45c1151 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright 2001-2006 Internet2
+ *  Copyright 2001-2007 Internet2
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -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;