ZyX wrote: > I now understand the source of the garbage: STRNCPY is not adding NUL > byte if it copied n bytes and there is no NUL in this n bytes. > Everything was in the man, I just had to reread it.
It might be easier to use vim_strncpy(). And vim_strcat() where appropriate. These always add a NUL and check the size of the buffer. -- Q: Is selling software the same as selling hardware? A: No, good hardware is sold new, good software has already been used by many. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org /// -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php
