ecere/gui/drivers/X: Fixed handling of SelectionRequest
authorJerome St-Louis <jerome@ecere.com>
Wed, 11 May 2016 04:05:18 +0000 (13:05 +0900)
committerJerome St-Louis <jerome@ecere.com>
Sat, 2 Jul 2016 20:41:08 +0000 (16:41 -0400)
- Multiplication by sizeof(Atom) was unnecessary and causing reading passed allocated memory

ecere/src/gui/drivers/XInterface.ec

index 606d6af..8ae03a3 100644 (file)
@@ -1947,7 +1947,7 @@ class XInterface : Interface
                      supportedTargets[2] = XA_STRING;
                      supportedTargets[3] = atoms[utf8_string];
                      XChangeProperty(xGlobalDisplay,req->requestor, req->_property,
-                        XA_ATOM,32,PropModeReplace, (byte *) supportedTargets, 4*sizeof(Atom));
+                        XA_ATOM,32,PropModeReplace, (byte *) supportedTargets, 4);
                      respond.xselection._property = req->_property;
                      delete supportedTargets;
                   }