summaryrefslogtreecommitdiffstats
path: root/unix/tclLoadDyld.c
diff options
context:
space:
mode:
authordas <das>2007-04-23 20:37:10 (GMT)
committerdas <das>2007-04-23 20:37:10 (GMT)
commit11ca07659da95471c4052ca8a89031838f4ba3ea (patch)
tree3d9e9569b91332064595bda6c305aafff957f147 /unix/tclLoadDyld.c
parentc93886c791c9d180c4e5fe39020495c2220bc3e6 (diff)
downloadtcl-11ca07659da95471c4052ca8a89031838f4ba3ea.zip
tcl-11ca07659da95471c4052ca8a89031838f4ba3ea.tar.gz
tcl-11ca07659da95471c4052ca8a89031838f4ba3ea.tar.bz2
* unix/tclLoadDyld.c (TclpLoadMemory): fix (void*) arithmetic.
Diffstat (limited to 'unix/tclLoadDyld.c')
-rw-r--r--unix/tclLoadDyld.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c
index 94cca40..f538968 100644
--- a/unix/tclLoadDyld.c
+++ b/unix/tclLoadDyld.c
@@ -7,12 +7,12 @@
* Wilfredo Sanchez (wsanchez@apple.com).
*
* Copyright (c) 1995 Apple Computer, Inc.
- * Copyright (c) 2005 Daniel A. Steffen <das@users.sourceforge.net>
+ * Copyright (c) 2001-2007 Daniel A. Steffen <das@users.sourceforge.net>
*
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclLoadDyld.c,v 1.25 2007/04/16 13:36:36 dkf Exp $
+ * RCS: @(#) $Id: tclLoadDyld.c,v 1.26 2007/04/23 20:37:10 das Exp $
*/
#include "tclInt.h"
@@ -475,7 +475,7 @@ TclpLoadMemory(
if ((size_t) codeSize >= sizeof(struct fat_header) +
fh_nfat_arch * sizeof(struct fat_arch)) {
- void *fatarchs = buffer + sizeof(struct fat_header);
+ void *fatarchs = (char*)buffer + sizeof(struct fat_header);
CONST NXArchInfo *arch = NXGetLocalArchInfo();
struct fat_arch *fa;
@@ -485,7 +485,7 @@ TclpLoadMemory(
fa = NXFindBestFatArch(arch->cputype, arch->cpusubtype,
fatarchs, fh_nfat_arch);
if (fa) {
- mh = buffer + fa->offset;
+ mh = (void*)((char*)buffer + fa->offset);
ms = fa->size;
} else {
err = NSObjectFileImageInappropriateFile;