Re: ORBit_copy_value_core() bug?



Hi,

On Wed, 2007-12-12 at 15:11 +0100, Michael Haubenwallner wrote:
> On Wed, 2007-12-12 at 14:44 +0100, Jules Colding wrote:
> > Hi,
> > 
> > I might just be suffering from coffee deficiency but shouldn't the copy
> > of sequences and arrays be walking the sequence/array members?
> > 
> > 
> > Thanks,
> >   jules
> > 
> > 
> > 
> > Index: corba-any.c
> > ===================================================================
> > --- corba-any.c	(revision 2040)
> > +++ corba-any.c	(working copy)
> > @@ -934,13 +934,13 @@
> >  		pval1 = ((CORBA_Principal *)*val)->_buffer;
> >  	
> >  		for (i = 0; i < ((CORBA_Principal *)*newval)->_length; i++)
> > -			ORBit_copy_value_core (&pval1, &pval2, tc->subtypes [0]);
> > +			ORBit_copy_value_core (&pval1[i], &pval2[i], tc->subtypes [0]);
> 
> AFAICT ORBit_copy_value_core() increments both 'pval' and 'pval2' by
> sizeof(CORBA_type), so subsequent call operates on next array element.
> Additionally, compiler would index _bytes_ here, not _types_.

You are probably right, but I must admit that I do not fully understand
this part of the source. I just need some time I'm sure...

Thanks,
  jules





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]