fix wrong encoding in uri_encode

This commit is contained in:
Daniel Kříž 2021-03-31 01:45:17 +02:00
parent c9dece3b86
commit 13c999d9d7

View file

@ -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;