[lazarus] Patches to Shanes files

Michael A. Hess mhess at miraclec.com
Wed Jul 7 14:09:14 EDT 1999


Shane Miller wrote:
> 
> I have fixed the problem with the events using a char array (sort of)
> by changing it to a PChar.
> 
> Here's the problem, even using a pchar and doing..
> 
> newpchar := StrAlloc(Length(StringVar)+1);
> StrPCopy(newPChar,StringVar);
> 
> I still get unwanted characters.  Why is this?  I'm not sure what the
> problem is.  I thought doing it this way would work.

If the StringVar has garbage data at the end it will still be there
after the conversion to PChar.

I'll give you a hand looking at this when I get home this afternoon.

-- 
==== Programming my first best destiny! ====

Michael A. Hess      Miracle Concepts, Inc.
mhess at miraclec.com   http://www.miraclec.com






More information about the Lazarus mailing list