diff options
Diffstat (limited to 'findutils')
-rw-r--r-- | findutils/grep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/findutils/grep.c b/findutils/grep.c index fc6de4b69..88de0d4ef 100644 --- a/findutils/grep.c +++ b/findutils/grep.c @@ -352,7 +352,7 @@ static int grep_file(FILE *file) goto opt_f_not_found; } else if (option_mask32 & OPT_w) { - char c = (match != str) ? match[-1] : ' '; + char c = (match != line) ? match[-1] : ' '; if (!isalnum(c) && c != '_') { c = match[strlen(gl->pattern)]; if (!c || (!isalnum(c) && c != '_')) |