summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2009-12-09 22:41:52 (GMT)
committerdkf <dkf@noemail.net>2009-12-09 22:41:52 (GMT)
commit574f16b8903fb814d730ebe38085cd8e8c91f50a (patch)
treea3c9e96e0beff9f5a6e9822510b654d0bb85d03b /generic
parent9752a445e8f6907a3c108f777db62c6fca82dc81 (diff)
downloadtk-574f16b8903fb814d730ebe38085cd8e8c91f50a.zip
tk-574f16b8903fb814d730ebe38085cd8e8c91f50a.tar.gz
tk-574f16b8903fb814d730ebe38085cd8e8c91f50a.tar.bz2
Apply [Bug 2911570]'s patch to make color value hashing work on 64-bit.
FossilOrigin-Name: 5f22563ca23978fb0fc1ac0bda9ad5fc154ab702
Diffstat (limited to 'generic')
-rw-r--r--generic/tkColor.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/generic/tkColor.c b/generic/tkColor.c
index ccd46e7..2035ec4 100644
--- a/generic/tkColor.c
+++ b/generic/tkColor.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkColor.c,v 1.21 2009/11/21 17:24:42 dkf Exp $
+ * RCS: @(#) $Id: tkColor.c,v 1.22 2009/12/09 22:41:52 dkf Exp $
*/
#include "tkInt.h"
@@ -301,8 +301,11 @@ Tk_GetColorByValue(
/*
* First, check to see if there's already a mapping for this color name.
+ * Must clear the structure first; it's not tightly packed on 64-bit
+ * systems. [Bug 2911570]
*/
+ memset(&valueKey, 0, sizeof(ValueKey));
valueKey.red = colorPtr->red;
valueKey.green = colorPtr->green;
valueKey.blue = colorPtr->blue;