Skip to content

Commit 7d16929

Browse files
Oops
1 parent 0d67a33 commit 7d16929

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dlib/unicode/unicode.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ namespace dlib
124124
// Convert
125125
std::string out(n, '\0');
126126
st = std::mbstate_t{};
127-
n = std::wcsrtombs(out.data(), &p, out.size(), &st);
127+
n = std::wcsrtombs(&out[0], &p, out.size(), &st);
128128
if (n == static_cast<std::size_t>(-1)) throw std::runtime_error("Conversion failed");
129129
return out;
130130
}

0 commit comments

Comments
 (0)