summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-05-26 13:56:51 -0400
committerPaul Smith <psmith@gnu.org>2013-05-26 13:56:51 -0400
commit119c5dd2b3027f621dd399b85eea9b01842edbc3 (patch)
tree39d1b331130d7371dfe91677afd979e229b19af3 /job.c
parent64c1d0740cb38b848b5605f8181015ef5a1e3839 (diff)
downloadmake-119c5dd2b3027f621dd399b85eea9b01842edbc3.tar.gz
[SV #39035] Compare OUT to the beginning of the OUT var/func, not IN.
Diffstat (limited to 'job.c')
-rw-r--r--job.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/job.c b/job.c
index 5f665a99..507b90db 100644
--- a/job.c
+++ b/job.c
@@ -2036,10 +2036,12 @@ new_job (struct file *file)
{
char openparen = *ref;
char closeparen = openparen == '(' ? ')' : '}';
+ char *outref;
int count;
char *p;
*out++ = *in++; /* Copy OPENPAREN. */
+ outref = out;
/* IN now points past the opening paren or brace.
Count parens or braces until it is matched. */
count = 0;
@@ -2072,7 +2074,7 @@ new_job (struct file *file)
/* Discard any preceding whitespace that has
already been written to the output. */
- while (out > ref
+ while (out > outref
&& isblank ((unsigned char)out[-1]))
--out;