mirror of
https://github.com/neovim/neovim.git
synced 2026-01-30 09:01:07 +10:00
refactor: replace char_u with char 22 (#21786)
Work on https://github.com/neovim/neovim/issues/459
This commit is contained in:
@@ -1575,7 +1575,7 @@ static bool extract_hunk(FILE *fd, diffhunk_T *hunk, diffstyle_T *diffstyle)
|
||||
// --- file1 2018-03-20 13:23:35.783153140 +0100
|
||||
// +++ file2 2018-03-20 13:23:41.183156066 +0100
|
||||
// @@ -1,3 +1,5 @@
|
||||
if (isdigit(*line)) {
|
||||
if (isdigit((uint8_t)(*line))) {
|
||||
*diffstyle = DIFF_ED;
|
||||
} else if ((strncmp(line, "@@ ", 3) == 0)) {
|
||||
*diffstyle = DIFF_UNIFIED;
|
||||
@@ -1593,7 +1593,7 @@ static bool extract_hunk(FILE *fd, diffhunk_T *hunk, diffstyle_T *diffstyle)
|
||||
}
|
||||
|
||||
if (*diffstyle == DIFF_ED) {
|
||||
if (!isdigit(*line)) {
|
||||
if (!isdigit((uint8_t)(*line))) {
|
||||
continue; // not the start of a diff block
|
||||
}
|
||||
if (parse_diff_ed(line, hunk) == FAIL) {
|
||||
|
||||
Reference in New Issue
Block a user