aboutsummaryrefslogtreecommitdiff
path: root/findutils/grep.c
diff options
context:
space:
mode:
Diffstat (limited to 'findutils/grep.c')
-rw-r--r--findutils/grep.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/findutils/grep.c b/findutils/grep.c
index a4033a40b..9d9da422c 100644
--- a/findutils/grep.c
+++ b/findutils/grep.c
@@ -404,7 +404,7 @@ static int grep_file(FILE *file)
#endif
) {
if (option_mask32 & OPT_x) {
- found = (gl->matched_range.rm_so == 0
+ found |= (gl->matched_range.rm_so == 0
&& match_at[gl->matched_range.rm_eo] == '\0');
} else
if (!(option_mask32 & OPT_w)) {