diff options
-rw-r--r-- | core/string/ustring.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/string/ustring.cpp b/core/string/ustring.cpp index 05c80296c2..cf0040353d 100644 --- a/core/string/ustring.cpp +++ b/core/string/ustring.cpp @@ -3772,9 +3772,9 @@ String String::uri_encode() const { } else { char h_Val[3]; #if defined(__GNUC__) || defined(_MSC_VER) - snprintf(h_Val, 3, "%hhX", ord); + snprintf(h_Val, 3, "%02hhX", ord); #else - sprintf(h_Val, "%hhX", ord); + sprintf(h_Val, "%02hhX", ord); #endif res += "%"; res += h_Val; |