Fixed issue #17: Copying text from a remote computer crashes java programs.

This commit is contained in:
Sorin Sbarnea 2009-03-21 22:02:56 +00:00
parent f49f12ceb5
commit ef7d5e4d08
1 changed files with 5 additions and 1 deletions

View File

@ -1381,7 +1381,11 @@ CXWindowsUtil::setWindowProperty(Display* display, Window window,
{ {
const UInt32 length = 4 * XMaxRequestSize(display); const UInt32 length = 4 * XMaxRequestSize(display);
const unsigned char* data = reinterpret_cast<const unsigned char*>(vdata); const unsigned char* data = reinterpret_cast<const unsigned char*>(vdata);
const UInt32 datumSize = static_cast<UInt32>(format / 8); UInt32 datumSize = static_cast<UInt32>(format / 8);
// format 32 on 64bit systems is 8 bytes not 4.
if (format == 32) {
datumSize = sizeof(Atom);
}
// save errors // save errors
bool error = false; bool error = false;