aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/diff.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/diff.c')
-rw-r--r--src/nvim/diff.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/diff.c b/src/nvim/diff.c
index 45f00cb41e..40be6b1abc 100644
--- a/src/nvim/diff.c
+++ b/src/nvim/diff.c
@@ -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) {