Hy all!

I'm getting a problem when using StrNCopy to copy a defined lenght of a
string into another. Sometimes, when a copy a odd lenght from a string to
another, the destination string  is not terminated correcty. See the example
below:

Char Variable1[11];
Char Variable2[7];

StrCopy(Variable1, "1234567890");
//The value of Variable1 is correct...

StrNCopy(Variable2, Variable1, 4);
//The value of Variable2 is correct... (1234)

StrNCopy(Variable2, Variable1, 5);
//The value of Variable2 isn't correct... (12345?), for example.

Does anybody know why? Thanks!



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to