diff options
author | Rob Landley <rob@landley.net> | 2015-11-01 05:43:03 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-11-01 05:43:03 -0600 |
commit | 2fe69382d37bf75ecf4ef4d730339c4982a82461 (patch) | |
tree | b65a459608cdbbd5ae2a10fd3d38cb43af19c815 /toys/posix | |
parent | 8205f5a88de29369b777533bb7ec4051454d31bc (diff) | |
download | toybox-2fe69382d37bf75ecf4ef4d730339c4982a82461.tar.gz |
Last patch broke creating new file as a patch, fix it.
(Matches beginning and EOF at once.)
Diffstat (limited to 'toys/posix')
-rw-r--r-- | toys/posix/patch.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/toys/posix/patch.c b/toys/posix/patch.c index b10b40c2..23fe83a0 100644 --- a/toys/posix/patch.c +++ b/toys/posix/patch.c @@ -7,7 +7,6 @@ * * TODO: * -b backup - * -l treat all whitespace as a single space * -N ignore already applied * -d chdir first * -D define wrap #ifdef and #ifndef around changes @@ -143,7 +142,7 @@ static int apply_one_hunk(void) else trailing = 0; if (toys.optflags & FLAG_x) fprintf(stderr, "HUNK:%s\n", plist->data); } - matcheof = trailing < TT.context; + matcheof = !trailing || trailing < TT.context; if (toys.optflags & FLAG_x) fprintf(stderr,"MATCHEOF=%c\n", matcheof ? 'Y' : 'N'); |