diff options
author | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2020-01-21 14:50:23 +0100 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2020-02-10 12:56:07 +0100 |
commit | 9a3bf87ee004a21950663ebba404394e20c79afc (patch) | |
tree | 27d6c0dbab044840dea84cb6650c4088bde92230 | |
parent | a8cb23a21a65bca28203ef79f931a4a8348ecba7 (diff) | |
download | efl-9a3bf87ee004a21950663ebba404394e20c79afc.tar.gz |
ecore_x_selection: do not skip any any atoms
i dont know why we skipped the first two atoms, but right now, if a
application is only providing one single target, we would crash.
With this we might copy a few atoms more. However, these atoms do not
matter, as we skip those, that we cannot understand
Differential Revision: https://phab.enlightenment.org/D11194
-rw-r--r-- | src/lib/ecore_x/ecore_x_selection.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/ecore_x/ecore_x_selection.c b/src/lib/ecore_x/ecore_x_selection.c index 22cd5c8c7f..733b799244 100644 --- a/src/lib/ecore_x/ecore_x_selection.c +++ b/src/lib/ecore_x/ecore_x_selection.c @@ -990,15 +990,15 @@ _ecore_x_selection_parser_targets(const char *target EINA_UNUSED, if (!sel) return NULL; targets = data; - sel->num_targets = size - 2; - sel->targets = malloc((size - 2) * sizeof(char *)); + sel->num_targets = size; + sel->targets = malloc((sel->num_targets) * sizeof(char *)); if (!sel->targets) { free(sel); return NULL; } - for (i = 2; i < size; i++) - sel->targets[i - 2] = XGetAtomName(_ecore_x_disp, targets[i]); + for (i = 0; i < size; i++) + sel->targets[i] = XGetAtomName(_ecore_x_disp, targets[i]); ECORE_X_SELECTION_DATA(sel)->free = _ecore_x_selection_data_targets_free; ECORE_X_SELECTION_DATA(sel)->content = ECORE_X_SELECTION_CONTENT_TARGETS; |