As the 3rd parameter at the strncpy is the length of the buffer, passing sizeof(buffer) -1 as this parameter you could eventually not copy the null terminator if the strlen of the source string is equal to sizeof(buffer) -1
That was why all those memset to 0 or dest[len]='\0' was there.
2009-11-11 07:46:36 UTC in BZFlag - Multiplayer 3D Tank Game