RE: [AD] 3.9.34 release date?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


> > Here's a patch for wsystem.c that allocates the memory dynamically. The
> > command line's length is tested properly, and the array of argv
> pointers is
> > realloced whenever necessary (64 at a time).
>
> Applied.

Duh, I'm thtoopid! memcpy() needs to know how much mem to cpy!

In other words, I forgot the 'num' parameter with memcpy(). Here's a patch.

Note that this dynamic memory stuff hasn't been tested (otherwise I would
have known :-) You may want to test it this time before applying... Test it
for critical situations like 64 parameters (where it should reallocate to
128 to allow for the null). I think it's correct though...

Ben Davis

Attachment: wsystem.c.diff
Description: Binary data



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/