[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua alloc function with just malloc and free causes crash
- From: ramsdell@... (John D. Ramsdell)
- Date: 05 Aug 2006 15:01:59 -0400
Klaus Ripke <paul-lua@malete.org> writes:
> On Sat, Aug 05, 2006 at 10:16:47AM -0400, John D. Ramsdell wrote:
> > else if (osize > nsize) {
> > void *p = malloc(nsize);
> > if (p == NULL)
> > return ptr;
> > memcpy(p, ptr, osize);
> how about using nsize here?
This fixes the problem. Please ignore my original post. Thank you
Klaus.
John