From 492470029d95c090f5acd0c7494721281b5c8176 Mon Sep 17 00:00:00 2001 From: bourcier Date: Wed, 3 Apr 2013 15:15:30 +0000 Subject: [PATCH] =?utf8?q?Correction=20d'un=20bug=20lorsqu'il=20y=20a=203?= =?utf8?q?=20subs=20ou=20plus.=20Il=20y=20avait=20un=20d=C3=83=C2=A9calage?= =?utf8?q?=20entre=20l'index=20de=20valPtr=20d'un=20sub=20et=20le=20dernie?= =?utf8?q?r=20index=20du=20sub=20pr=C3=83=C2=A9c=C3=83=C2=A9dent,=20car=20?= =?utf8?q?nbE=20=C3=83=C2=A9tait=20toujours=20r=C3=83=C2=A9cup=C3=83=C2=A9?= =?utf8?q?r=C3=83=C2=A9=20avec=20le=20m=C3=83=C2=AAme=20sub=20lors=20du=20?= =?utf8?q?calcul=20de=20valsShift.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/MEDLoader/SauvMedConvertor.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/MEDLoader/SauvMedConvertor.cxx b/src/MEDLoader/SauvMedConvertor.cxx index 246e4bef0..f4af715ff 100644 --- a/src/MEDLoader/SauvMedConvertor.cxx +++ b/src/MEDLoader/SauvMedConvertor.cxx @@ -2383,7 +2383,7 @@ int DoubleField::setValues( double * valPtr, const int iSub, const int elemShift THROW_IK_EXCEPTION("SauvMedConvertor.cxx: support size mismatches field size"); // compute nb values in previous subs int valsShift = 0; - for ( int iS = iSub-1, shift = elemShift; shift > 0; ) + for ( int iS = iSub-1, shift = elemShift; shift > 0; --iS) { int nbE = _sub[iS]._support->size(); shift -= nbE; -- 2.39.2