--On 16 July 2001 12:51 -0500 Jeremy Nuss <[EMAIL PROTECTED]> wrote:

> Hello all, I have a problem of sorts.  It seems that if I call
> MemPtrResize on the same variable more than once I get a fatal error.
> Anyone else had this problem?  (POSE says that I have written directly to
> memory manager. Heres the code I use:
>
> <pseudo code>
>
> (global variable) char** string;
> (global variable) UInt   CurrentNumberofStrings = 0;
> (string was MemPtrNew()'d before this.)
> (CurrentNumberofStrings contains the number of strings that "string" has
> when it was initialized)
>
> </pseudo code>
>
> <code>
>
> MemPtrResize(string, sizeof(char *) * CurrentNumberofStrings + sizeof(char
> *));
> string[CurrentNumberofStrings] = (char *)MemPtrNew(StrLen(ptr) + 1);  //
> line that POSE indicates problem
> CurrentNumberofStrings++;
>
> </code>

MemPtrResize returns error status that should be handled properly if != 0, 
you don't seem to be doing that...

IM

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to