From 3c42cf1d55262253c53bd103602ad18f3a611d4d Mon Sep 17 00:00:00 2001 From: George Bosilca Date: Sun, 11 Jun 2006 20:40:32 +0000 Subject: [PATCH] Correctly compute the location of the dt_args pointers. This commit was SVN r10296. --- ompi/datatype/dt_args.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ompi/datatype/dt_args.c b/ompi/datatype/dt_args.c index fd504be05d..b7d1958ee0 100644 --- a/ompi/datatype/dt_args.c +++ b/ompi/datatype/dt_args.c @@ -66,12 +66,12 @@ typedef struct __dt_args { buf += pArgs->ca * sizeof(MPI_Aint); \ } \ if( pArgs->cd == 0 ) pArgs->d = NULL; \ - else pArgs->d = (MPI_Datatype*)buf; \ - if( pArgs->ci == 0 ) pArgs->i = NULL; \ - else { \ - pArgs->i = (int*)buf; \ - buf += pArgs->ci * sizeof(int); \ + else { \ + pArgs->d = (MPI_Datatype*)buf; \ + buf += pArgs->cd * sizeof(MPI_Datatype); \ } \ + if( pArgs->ci == 0 ) pArgs->i = NULL; \ + else pArgs->i = (int*)buf; \ pArgs->ref_count = 1; \ pArgs->total_pack_size = (4 + (IC)) * sizeof(int) + \ (AC) * sizeof(MPI_Aint) + (DC) * sizeof(int); \