"Butch Howard" <[EMAIL PROTECTED]> wrote
> The code is wrong, but not for the reason given.
>
> test[cDataNeeded] is exactly cDataNeeded cells long (8 in this case).  The
> problem is that "012345678" is 10 cells in length: the nine chars visible
> between the quotation marks plus one for the null byte implicit at the end
> of a string literal.
>
Well, just shoot my dog why don'cha?  Exactly the sort of mistake that
reinforces my reason for proposing StrNCopy, although the example might have
been more useful if I hadn't written it in my sleep.

Thanks for the correction.

Chris Tutty



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