neovim/neovim — pull request #249 by simendsjo (2014-03-02 09:20:51+00:00)
Title: vim_strsize and vim_strnsize should return 0 size for null-strings.

This avoids dereferencing a null pointer as well as being consisntent with
empty strings. Calls to these functions no longer need null guards.

Note that this is not the only solution. Another would be to use an assertion instead, giving the same behavior as we have today.

See the discussion on "assert vs return 0" here: https://groups.google.com/forum/#!topic/neovim/AqZxA314ntE