Fix make(1) behaviour regarding SysV-style substitution when given a nil
left-hand-side. PR: bin/5297 Submitted by: "Matthew Emmerton" <matt@gsicomp.on.ca> MFC after: 1 week
This commit is contained in:
parent
a9b736ad72
commit
417485c74a
@ -417,6 +417,12 @@ Str_SYSVMatch(word, pattern, len)
|
||||
char *w = word;
|
||||
char *m;
|
||||
|
||||
if (*w == '\0') {
|
||||
/* Zero-length word cannot be matched against */
|
||||
*len = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (*p == '\0') {
|
||||
/* Null pattern is the whole string */
|
||||
*len = strlen(w);
|
||||
|
Loading…
x
Reference in New Issue
Block a user