diff options
author | Nicolas Hillegeer <nicolas@hillegeer.com> | 2014-05-29 10:13:08 +0200 |
---|---|---|
committer | Justin M. Keyes <justinkz@gmail.com> | 2014-06-08 12:48:22 -0400 |
commit | 46e4bc04819935327636e918cc8fdd2f8b3c9ddf (patch) | |
tree | abafb882fb6c6ad45723569b5e4872d7add1bbb9 /clint.py | |
parent | 63a956112aefc18de86197edc05a76eae0da024a (diff) | |
download | rneovim-46e4bc04819935327636e918cc8fdd2f8b3c9ddf.tar.gz rneovim-46e4bc04819935327636e918cc8fdd2f8b3c9ddf.tar.bz2 rneovim-46e4bc04819935327636e918cc8fdd2f8b3c9ddf.zip |
text: remove useless arg from mb_string2cells
mb_string2cells was always called like mb_string2cells(..., -1) so that was
the only codepath that was tested. @tarruda was the first to try to input an
actual length, after which valgrind detected that funny business was going
on.
It's not even possible to do the right thing with the current text codec
infrastructure: they all assume to be working with C strings. Meaning that
if there is no NUL-terminator, they will happily keep on reading past the
end of Pascal strings. Ergo, passing the length parameter is moot. The
condition in the for-loop was wrong as well (but that's no longer relevant).
Also change the return value to size_t, by analogy with strlen.
ref:
https://github.com/neovim/neovim/commit/677d30d7966dd2766bbf20665791c568dacc427a
Diffstat (limited to 'clint.py')
0 files changed, 0 insertions, 0 deletions