diff --git a/src/color.c b/src/color.c index 81799d1b..5b688991 100644 --- a/src/color.c +++ b/src/color.c @@ -295,7 +295,7 @@ void color_update(void) void check_the_multis(filestruct *line) { const colortype *ink; - int astart, anend; + bool astart, anend; regmatch_t startmatch, endmatch; /* If there is no syntax or no multiline regex, there is nothing to do. */ @@ -309,8 +309,8 @@ void check_the_multis(filestruct *line) alloc_multidata_if_needed(line); - astart = regexec(ink->start, line->data, 1, &startmatch, 0); - anend = regexec(ink->end, line->data, 1, &endmatch, 0); + astart = (regexec(ink->start, line->data, 1, &startmatch, 0) == 0); + anend = (regexec(ink->end, line->data, 1, &endmatch, 0) == 0); /* Check whether the multidata still matches the current situation. */ if (line->multidata[ink->id] == CNONE ||