From 11ca07659da95471c4052ca8a89031838f4ba3ea Mon Sep 17 00:00:00 2001 From: das Date: Mon, 23 Apr 2007 20:37:10 +0000 Subject: * unix/tclLoadDyld.c (TclpLoadMemory): fix (void*) arithmetic. --- unix/tclLoadDyld.c | 8 ++++---- 1 file 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 + * Copyright (c) 2001-2007 Daniel A. Steffen * * 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; -- cgit v0.12