summaryrefslogtreecommitdiff
path: root/src/utils
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/stringutils.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index a5435f3f9..af4cafd35 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -573,9 +573,12 @@ std::string stringToHexPath(const std::string &str)
if (str.empty())
return "";
- std::string hex = strprintf("%%%2x/", static_cast<int>(str[0]));
- for (unsigned f = 1, sz = static_cast<unsigned>(str.size()); f < sz; f ++)
- hex.append(strprintf("%%%2x", static_cast<int>(str[f])));
+ std::string hex = strprintf("%%%2x/", static_cast<unsigned int>(str[0]));
+ for (unsigned f = 1, sz = static_cast<unsigned int>(str.size());
+ f < sz; f ++)
+ {
+ hex.append(strprintf("%%%2x", static_cast<unsigned int>(str[f])));
+ }
return hex;
}