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, 11 Jun 2016 07:07:22 +0000 (03:07 -0400)
- Multiplication by sizeof(Atom) was unnecessary and causing reading passed allocated memory

ecere/src/gui/drivers/XInterface.ec

index 52dc73d..13c166a 100644 (file)
@@ -1956,7 +1956,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;
                   }