From edcb95cedeccffdbba320f6412c10a77f9e7c068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20K=C5=99=C3=AD=C5=BE?= Date: Wed, 31 Mar 2021 01:45:17 +0200 Subject: [PATCH] fix wrong encoding in uri_encode (cherry picked from commit 13c999d9d75887ecacd1a7348ad0267131252b13) --- core/ustring.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/ustring.cpp b/core/ustring.cpp index 6190a375e0c..63e83292be6 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -3451,9 +3451,9 @@ String String::http_escape() 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;