C (14/178)

From:Tim Hanson
Date:11 Jul 2000 at 11:44:52
Subject:Re: Background task name.

Hi Colin
Colin Wenzel wrote this on 11-Jul-00 at 03:56:11
> On 11-Jul-00, Tim Hanson wrote:
>> So the general concensus is that it`s ok to task=FindTask(NULL) then
>> strcpy(task->tc_Node.ln_Name,"newname"); as long as newname is
>> shorter than the old name. Or should I just use
>
> No, *definately not,* the old one may even be NULL...

I hadn`t thought of that. I did check the length with strlen() to make sure
the new name would fit and exited otherwise but strlen() would guru on a NULL
presumably.

> Do not use strcpy() , just change the pointer,
> but make sure you restore it before exit().

Yes. I`ll change it.



Tim Hanson,
by the River,Canterbury, Kent.
Amiga A1200T,`040/25,603e/160,32MB Fast,BVisionPPC,
8.4GB IDE HD,ZIP SCSI,RENO x2CD SCSI,Pace 56K
Don`t waste your time by visiting
http://www.sinister67.freeserve.co.uk

------------------------------------------------------------------------
Life's too short to send boring email. Let SuperSig come to the rescue.
http://click.egroups.com/1/6809/1/_/451227/_/963312428/
------------------------------------------------------------------------