aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities/Util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/Utilities/Util.cpp')
-rw-r--r--src/common/Utilities/Util.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/common/Utilities/Util.cpp b/src/common/Utilities/Util.cpp
index 36099263c03..099de72c7af 100644
--- a/src/common/Utilities/Util.cpp
+++ b/src/common/Utilities/Util.cpp
@@ -251,9 +251,9 @@ bool Utf8toWStr(char const* utf8str, size_t csize, wchar_t* wstr, size_t& wsize)
{
try
{
- Trinity::BufferWriteGuard<wchar_t> guard(wstr, wsize);
- guard = utf8::utf8to16(utf8str, utf8str+csize, guard);
- wsize -= guard.size(); // remaining unused space
+ Trinity::CheckedBufferOutputIterator<wchar_t> out(wstr, wsize);
+ out = utf8::utf8to16(utf8str, utf8str+csize, out);
+ wsize -= out.remaining(); // remaining unused space
wstr[wsize] = L'\0';
}
catch (std::exception const&)