diff options
author | Justin M. Keyes <justinkz@gmail.com> | 2017-05-08 13:45:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-08 13:45:14 +0200 |
commit | a9605bb4aff76a934a4c39fbda093ee8fc8a1c71 (patch) | |
tree | 47dbb30254735b7184442eb9ab290659259b9635 /src/nvim/mbyte.c | |
parent | 631d55ada04bfeaedabb5bf43092457c5f78b8a5 (diff) | |
parent | 22fb9d8d25f5354bb878b953ba49b439961c8476 (diff) | |
download | rneovim-a9605bb4aff76a934a4c39fbda093ee8fc8a1c71.tar.gz rneovim-a9605bb4aff76a934a4c39fbda093ee8fc8a1c71.tar.bz2 rneovim-a9605bb4aff76a934a4c39fbda093ee8fc8a1c71.zip |
Merge #6460 from ZyX-I/1476-changes
Refactor functions which find character in a string
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r-- | src/nvim/mbyte.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index 8a68ce0915..d5907da2ed 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -359,10 +359,10 @@ int bomb_size(void) */ void remove_bom(char_u *s) { - char_u *p = s; + char *p = (char *)s; - while ((p = vim_strbyte(p, 0xef)) != NULL) { - if (p[1] == 0xbb && p[2] == 0xbf) { + while ((p = strchr(p, 0xef)) != NULL) { + if ((uint8_t)p[1] == 0xbb && (uint8_t)p[2] == 0xbf) { STRMOVE(p, p + 3); } else { p++; |