diff options
author | Daniel Kříž <Daniel.kriz@protonmail.com> | 2021-03-31 01:45:17 +0200 |
---|---|---|
committer | Daniel Kříž <Daniel.kriz@protonmail.com> | 2021-04-10 17:54:18 +0200 |
commit | 13c999d9d75887ecacd1a7348ad0267131252b13 (patch) | |
tree | e3ef479b68ca130d1bb1b1769c6c8463d2a10b86 /core/string/ustring.cpp | |
parent | c9dece3b86aad6c6f6cbd95c8abc4c14f358c3f5 (diff) |
fix wrong encoding in uri_encode
Diffstat (limited to 'core/string/ustring.cpp')
-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 28228e4a83..736248e6ee 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; |