summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkSelect.c4
-rw-r--r--generic/tkTextDisp.c2
-rw-r--r--macosx/tkMacOSXDialog.c6
-rw-r--r--tests/menu.test2
4 files changed, 7 insertions, 7 deletions
diff --git a/generic/tkSelect.c b/generic/tkSelect.c
index 74b3964..4c3bbfd 100644
--- a/generic/tkSelect.c
+++ b/generic/tkSelect.c
@@ -190,8 +190,8 @@ Tk_CreateSelHandler(
* should make a copy for this selPtr.
*/
- unsigned cmdInfoLen = Tk_Offset(CommandInfo, command) +
- ((CommandInfo *)clientData)->cmdLength + 1;
+ unsigned cmdInfoLen = Tk_Offset(CommandInfo, command) + 1 +
+ ((CommandInfo *)clientData)->cmdLength;
selPtr->clientData = ckalloc(cmdInfoLen);
memcpy(selPtr->clientData, clientData, cmdInfoLen);
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index 0958986..c04027d 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -7561,7 +7561,7 @@ TkTextCharLayoutProc(
ciPtr = &bciPtr->ci;
} else {
bciPtr = baseCharChunkPtr->clientData;
- ciPtr = ckalloc(sizeof(CharInfo));
+ ciPtr = ckalloc(Tk_Offset(CharInfo, chars) + 1);
baseString = &bciPtr->baseChars;
}
diff --git a/macosx/tkMacOSXDialog.c b/macosx/tkMacOSXDialog.c
index ca55c60..42cd1e5 100644
--- a/macosx/tkMacOSXDialog.c
+++ b/macosx/tkMacOSXDialog.c
@@ -755,15 +755,15 @@ Tk_GetSaveFileObjCmd(
[label setBordered:NO];
[label setBezeled:NO];
[label setDrawsBackground:NO];
-
+
NSPopUpButton *popupButton = [[NSPopUpButton alloc] initWithFrame:NSMakeRect(50.0, 2, 140, 22.0) pullsDown:NO];
[popupButton addItemsWithTitles:saveFileTypes];
[popupButton setAction:@selector(saveFormat:)];
-
+
[accessoryView addSubview:label];
[accessoryView addSubview:popupButton];
[savepanel setAllowedFileTypes:saveFileTypes];
-
+
[savepanel setAccessoryView:accessoryView];
[savepanel setAllowsOtherFileTypes:YES];
}
diff --git a/tests/menu.test b/tests/menu.test
index 479978e..af78947 100644
--- a/tests/menu.test
+++ b/tests/menu.test
@@ -3879,7 +3879,7 @@ test menu-37.1 {menubar menues cannot be posted - bug 2160206} -setup {
} -result {1 {a menubar menu cannot be posted}}
test menu-38.1 {Can't dismiss ttk::menubutton menu until mouse has hovered over it - bug fa32290898} -setup {
-} -constraints {macOrUnix} -body {
+} -constraints {userInteraction} -body {
toplevel .top
ttk::menubutton .top.mb -text "Some menu";
menu .top.mb.m;