summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordas <das>2007-05-09 12:55:57 (GMT)
committerdas <das>2007-05-09 12:55:57 (GMT)
commit93ee8305508155560c380e1aa6cbde8bcc6e2315 (patch)
tree40b2a95d55b057cd084ae08fb67d8492bdea0a1f /generic
parent0537d1c70efd92c5bd39a4047c02524d70ad7a58 (diff)
downloadtk-93ee8305508155560c380e1aa6cbde8bcc6e2315.zip
tk-93ee8305508155560c380e1aa6cbde8bcc6e2315.tar.gz
tk-93ee8305508155560c380e1aa6cbde8bcc6e2315.tar.bz2
* generic/tkFileFilter.c (AddClause): OSType endianness fixes.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkFileFilter.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/generic/tkFileFilter.c b/generic/tkFileFilter.c
index 319065f..d9dc511 100644
--- a/generic/tkFileFilter.c
+++ b/generic/tkFileFilter.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkFileFilter.c,v 1.5 2002/01/27 11:10:50 das Exp $
+ * RCS: @(#) $Id: tkFileFilter.c,v 1.5.2.1 2007/05/09 12:55:57 das Exp $
*/
#include "tkInt.h"
@@ -313,12 +313,15 @@ static int AddClause(interp, filterPtr, patternsStr, ostypesStr, isWindows)
if (ostypeCount > 0 && ostypeList != NULL) {
for (i=0; i<ostypeCount; i++) {
MacFileType * mfPtr = (MacFileType*)ckalloc(sizeof(MacFileType));
+ char *string = ostypeList[i];
- memcpy(&mfPtr->type, ostypeList[i], sizeof(OSType));
+ mfPtr->type = (OSType) string[0] << 24 | (OSType) string[1] << 16 |
+ (OSType) string[2] << 8 | (OSType) string[3];
/*
* Add the Mac type pattern into the list of Mac types
*/
+
if (clausePtr->macTypes == NULL) {
clausePtr->macTypes = clausePtr->macTypesTail = mfPtr;
} else {