summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'SwifTools')
-rw-r--r--SwifTools/URIHandler/XMPPURI.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/SwifTools/URIHandler/XMPPURI.cpp b/SwifTools/URIHandler/XMPPURI.cpp
index 496871c..de83ac2 100644
--- a/SwifTools/URIHandler/XMPPURI.cpp
+++ b/SwifTools/URIHandler/XMPPURI.cpp
@@ -48,7 +48,8 @@ struct PercentUnencodeFormatter {
if (s.fail() || s.bad()) {
throw std::runtime_error("Invalid escape character");
}
- return std::string(reinterpret_cast<const char*>(&value), 1);
+ unsigned char charValue = static_cast<unsigned char>(value);
+ return std::string(reinterpret_cast<const char*>(&charValue), 1);
}
};