Fix a bug where the content of variables are appended instead of being
authorKim Nguyễn <kn@lri.fr>
Mon, 15 Jul 2013 15:37:39 +0000 (17:37 +0200)
committerKim Nguyễn <kn@lri.fr>
Mon, 15 Jul 2013 15:37:39 +0000 (17:37 +0200)
overwritten. Thus, when several sub-process send variable A=foo to the
server, the content of A becomes foofoofoofoo instead of just foo.

remake.cpp

index 77020a5..558ff3a 100644 (file)
@@ -2565,6 +2565,7 @@ void accept_client()
                   goto error;
                 }
                 DEBUG << "adding variable " << line << " to job " << job_id << std::endl;
+                vars[name].clear();
                 read_words(in, vars[name]);
                p += len + 1;
         }