Woah!  Thanks for catching that.

--

Tim Astle


Roger Chaplin <[EMAIL PROTECTED]> wrote in message
news:9394@palm-dev-forum...
>
> In reply to "Tim Astle" <[EMAIL PROTECTED]>:
>
> > Thanks for the tip.  I changed my code around to match your suggestion,
but
> > the problem still exists.
> >
> > Here is the code segment I neglected to insert last time.  It's been
changed
> > though, according to your very valid point :-)
> >
> >
> > void GetDecFromString(CharPtr str, decNumPtr result)
> > {
> >      CharPtr temp = MemPtrNew(StrLen(str) + 1);
> >
>
> [ stuff deleted ]
>
> >      // Terminate second string
> >      temp[k] = '\0';
> >
> >      MemPtrFree(temp);
> >
> >      // Convert the strings to an integer
> >      num = StrAToI(temp);
>
> Whoa! You're freeing the temp memory *before* using it as an argument
> to StrAToI?
>
> --
> Roger Chaplin
> <[EMAIL PROTECTED]>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to