From 00b4b36d347f778a3265ab16a0cadd1239537f21 Mon Sep 17 00:00:00 2001 From: fvogel Date: Sun, 9 Apr 2017 20:12:40 +0000 Subject: Fix [3f323bf2b4]: wm protocol crash on OSX compiled with XCode 8.3.1. Patch from Christian Gollwitzer --- macosx/tkMacOSXWm.h | 4 ++-- 1 file 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 -- cgit v0.12