> > Not writing the NUL when it's already there should catch more cases. > > It's too easy to add another ui_write() with a string literal. I'll > > make a patch that solves it this way, please check. > > I agree with you that not writing the NUL would be better but then why the > "len" argument? Its presence suggests to me that the first argument need > not be NUL-byte terminated.
It does not have to be NUL terminated. But when passing a literal string it will be, and then writing the NUL causes problems. It would still fail when passing a literal string with a "len" that is less than the actual length. But that's unlikely to happen. -- hundred-and-one symptoms of being an internet addict: 129. You cancel your newspaper subscription. /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\ /// \\\ \\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ /// \\\ 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/202104201822.13KIMQed906512%40masaka.moolenaar.net.
