Fix crash when a WM_DDE_INITIATE is received from a native ANSI window

This commit is contained in:
David Capello 2016-05-09 12:50:53 -03:00
parent 31116ff424
commit 095078ad04

View File

@ -33,7 +33,7 @@ std::string get_atom_string(ATOM atom, bool isUnicode)
result = base::to_utf8(std::wstring(&buf[0]));
}
else {
std::vector<char> buf;
std::vector<char> buf(256, 0);
UINT chars = GlobalGetAtomNameA(atom, &buf[0], buf.size());
result = &buf[0];
}