diff options
author | gcramer <remarcg@gmx.net> | 2018-10-25 09:26:27 (GMT) |
---|---|---|
committer | gcramer <remarcg@gmx.net> | 2018-10-25 09:26:27 (GMT) |
commit | eb7ee512b60d5286973b16aec0acae9ad0ac58ed (patch) | |
tree | 446f818f9cc2304bc0640bc95b67ce8aa9b39547 | |
parent | 0d0f220927b021d6dd52eb8febfa557bb1446923 (diff) | |
download | tk-eb7ee512b60d5286973b16aec0acae9ad0ac58ed.zip tk-eb7ee512b60d5286973b16aec0acae9ad0ac58ed.tar.gz tk-eb7ee512b60d5286973b16aec0acae9ad0ac58ed.tar.bz2 |
Important fix: on 64 bit systems the key did contain uninitialized bytes. Hopefully this will finally solve the 64 bit problem.
-rw-r--r-- | generic/tkBind.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c index 786e23a..97a329e 100644 --- a/generic/tkBind.c +++ b/generic/tkBind.c @@ -895,6 +895,9 @@ SetupPatternKey( assert(key); assert(psPtr); + /* otherwise on some systems the key contains uninitialized bytes */ + memset(key, 0, sizeof(PatternTableKey)); + patPtr = psPtr->pats; key->object = psPtr->object; key->type = patPtr->eventType; @@ -978,8 +981,8 @@ GetLookupForEvent( assert(lookupTables); assert(eventPtr); - key.detail.name = NULL; - key.detail.info = 0; + /* otherwise on some systems the key contains uninitialized bytes */ + memset(&key, 0, sizeof(PatternTableKey)); if (onlyConsiderDetailedEvents) { switch (eventPtr->xev.type) { @@ -2510,7 +2513,9 @@ VirtPatIsBound( } } + /* otherwise on some systems the key contains uninitialized bytes */ memset(&key, 0, sizeof(key)); + key.object = object; key.type = VirtualEvent; owners = psPtr->ptr.owners; |