mirror of
https://github.com/neovim/neovim.git
synced 2025-09-27 21:48:35 +00:00
Merge #6460 from ZyX-I/1476-changes
Refactor functions which find character in a string
This commit is contained in:
@@ -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++;
|
||||
|
Reference in New Issue
Block a user