mirror of
https://github.com/sheumann/hush.git
synced 2024-12-22 14:30:31 +00:00
Removed REG_NEWLINE from regcomp to fix the same bug found in grep where it
would not match blank lines (bug #1064). Followed Matt Kraii's suit on his 1.42 revision of grep. Tested it, works.
This commit is contained in:
parent
e7ff2842dd
commit
eb69ead091
@ -222,7 +222,7 @@ static int get_address(const char *str, int *line, regex_t **regex)
|
||||
fatalError("unterminated match expression\n");
|
||||
my_str[idx] = '\0';
|
||||
*regex = (regex_t *)xmalloc(sizeof(regex_t));
|
||||
xregcomp(*regex, my_str+1, REG_NEWLINE);
|
||||
xregcomp(*regex, my_str+1, 0);
|
||||
idx++; /* so it points to the next character after the last '/' */
|
||||
}
|
||||
else {
|
||||
|
2
sed.c
2
sed.c
@ -222,7 +222,7 @@ static int get_address(const char *str, int *line, regex_t **regex)
|
||||
fatalError("unterminated match expression\n");
|
||||
my_str[idx] = '\0';
|
||||
*regex = (regex_t *)xmalloc(sizeof(regex_t));
|
||||
xregcomp(*regex, my_str+1, REG_NEWLINE);
|
||||
xregcomp(*regex, my_str+1, 0);
|
||||
idx++; /* so it points to the next character after the last '/' */
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user