--On 27 July 2001 21:33 +0200 Aaron Ardiri <[EMAIL PROTECTED]> wrote:

<snip>

>> My question is:-
>>
>> {
>>  Char dst[200];
>>  Char src[500];
>>  MemSet(src, 499, 32);
>>  src[500] = \0;
>
>   ^^ overshooting your array :)

My dinner was getting cold, thus the brain had temporarily relocated to the 
stomach area :-P

>>  StrNCopy(str, src, 200);
>
>   ^^ str is? you mean dst here?

See my point above...

>>  FrmCustomAlert(ID_ALERT, "It ", src[500] == \0 ? "is": "is not", "
>> terminated");
>> }
>>
>> What would the alert say?

OOPS!!! My brain is back to where it belongs (open to interpretations!)...

It should've said:-

{
 Char dst[201];
 Char src[500];

 MemSet(src, 499, 32);
 src[499] = \0;

 StrNCopy(str, src, 200);

 FrmCustomAlert(ID_ALERT, "It ", dst[200] == \0 ? "is": "is not", " 
terminated");
                                     ^^^ (0-199 - 200 chars, 200 - 
terminator)
}

"is" or "isn't" ?

Aaron:-  :-PPPPPPP
Also, Aaron, any chance you could set up your website to be more cache 
friendly??? Please :-)

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