[PD-dev] help-array crashing outlet_anything

Claude Heiland-Allen claudiusmaximus at goto10.org
Wed Jul 25 18:18:38 CEST 2007


nosehair911 at bellsouth.net wrote:
> Intstore *storepointer;

> Intstore *storepointer = new Intstore();

> 	storepointer[arraynumber] = *pointer;

This is the problem.  You have only one Intstore object pointed to by 
storepointer, but you're assuming you have more than one whenever 
arraynumber is not 0.  When arraynumber is not 0, you get undefined 
behaviour (which could be wrong results or (if you're lucky) a crash).


Claude
-- 
http://claudiusmaximus.goto10.org





More information about the Pd-dev mailing list