Not in my experience. I'ld physically place a NULL. In your case, like a
"tmpstr[24]=0;"

Derek Kite wrote:
> 
> I am getting an error "Reading from memory management structure"
> 
>         frm = FrmGetFormPtr(jobdetailsform);
> 
>         // copy job number to top label
>         FrmCopyLabel(frm,detailsjobnumlabel,lap->jobdata.fields[inumber]);
>     if (StrLen(lap->jobdata.fields[icustomer]) > 24)
>     {
>                 tmpstr = MemPtrNew(26);
>                 tmpstr = StrNCopy(tmpstr,lap->jobdata.fields[icustomer],24);
> // --->HERE     FrmCopyLabel(frm,detailcustlabel,tmpstr);
>                 MemPtrFree(tmpstr);
> 
>     }
> 
> Does StrNCopy terminate the string with a NULL? All the data looks fine, tmpstr
> contains a truncated string as expected.
> 
> Derek

-- 
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