summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2017-04-10 18:31:50 (GMT)
committerfvogel <fvogelnew1@free.fr>2017-04-10 18:31:50 (GMT)
commitd0b2903c36818b184c4600ce56f2ec84a9957638 (patch)
tree485d5e34db883a341eca642d0880101a20075a8e
parent5e7bb15adeeb3247cda371a6dc0e132fe670954f (diff)
parent5585b37bd8ba8f04fef131a80360d286bc00a5db (diff)
downloadtk-d0b2903c36818b184c4600ce56f2ec84a9957638.zip
tk-d0b2903c36818b184c4600ce56f2ec84a9957638.tar.gz
tk-d0b2903c36818b184c4600ce56f2ec84a9957638.tar.bz2
Fix [3f323bf2b4]: wm protocol crash on OSX compiled with XCode 8.3.1. Patch from Christian Gollwitzer.
-rw-r--r--macosx/tkMacOSXWm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/macosx/tkMacOSXWm.h b/macosx/tkMacOSXWm.h
index d98010f..0a128ef 100644
--- a/macosx/tkMacOSXWm.h
+++ b/macosx/tkMacOSXWm.h
@@ -29,7 +29,7 @@ typedef struct ProtocolHandler {
* same top-level window, or NULL for end of
* list. */
Tcl_Interp *interp; /* Interpreter in which to invoke command. */
- char command[4]; /* Tcl command to invoke when a client message
+ char command[]; /* Tcl command to invoke when a client message
* for this protocol arrives. The actual size
* of the structure varies to accommodate the
* needs of the actual command. THIS MUST BE
@@ -37,7 +37,7 @@ typedef struct ProtocolHandler {
} ProtocolHandler;
#define HANDLER_SIZE(cmdLength) \
-((unsigned) (sizeof(ProtocolHandler) - 3 + cmdLength))
+((unsigned) (sizeof(ProtocolHandler) + cmdLength + 1))
/*
* A data structure of the following type holds window-manager-related