summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnders Björklund <anders@itension.se>2016-07-14 23:22:25 +0200
committerJoel Rosdahl <joel@rosdahl.net>2016-07-19 16:59:39 +0200
commit9c65c408580c78b9e1020f61fb465eb454f35304 (patch)
tree18dba7050b5a6588df8a0419994269fc1eba66fa
parent7899edd41c7d4943604ef56c0bcecfa81e10abb1 (diff)
downloadccache-9c65c408580c78b9e1020f61fb465eb454f35304.tar.gz
Make sure to hash the trailing quote when skipping
Turns out that 3.2-maint hashes preprocessor output a bit differently, so the workaround for skipping certain lines was broken in backport. When skipping the "extra line", the trailing quotes were missing from the output causing the hash to be different from the normal output.
-rw-r--r--ccache.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ccache.c b/ccache.c
index 624036c8..49b2092c 100644
--- a/ccache.c
+++ b/ccache.c
@@ -755,9 +755,11 @@ process_preprocessed_file(struct mdfour *hash, const char *path)
if (str_startswith(q, "# 31 \"<command-line>\"\n")) {
/* Bogus extra line with #31, after the regular #1:
Ignore the whole line, and continue parsing */
+ hash_buffer(hash, p, q - p);
while (q < end && *q != '\n') {
q++;
}
+ q++;
p = q;
continue;
} else if (str_startswith(q, "# 32 \"<command-line>\" 2\n")) {