summaryrefslogtreecommitdiffstats
path: root/src/msvc_helper-win32.cc
diff options
context:
space:
mode:
authorScott Graham <scottmg@chromium.org>2015-06-18 22:52:25 (GMT)
committerScott Graham <scottmg@chromium.org>2015-06-18 22:52:25 (GMT)
commit312c6aa131943408e9a0268c11806369f84063e3 (patch)
tree3a6351e50bf8748ce69d1ec749b5bb9c5ebed6b6 /src/msvc_helper-win32.cc
parentfd4b140467887be6cb96154d28b9636fe387c69d (diff)
downloadNinja-312c6aa131943408e9a0268c11806369f84063e3.zip
Ninja-312c6aa131943408e9a0268c11806369f84063e3.tar.gz
Ninja-312c6aa131943408e9a0268c11806369f84063e3.tar.bz2
don't alias input/output in ExtractDeps (i.e. actually works now)
Diffstat (limited to 'src/msvc_helper-win32.cc')
-rw-r--r--src/msvc_helper-win32.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/msvc_helper-win32.cc b/src/msvc_helper-win32.cc
index 78b79b0..d516240 100644
--- a/src/msvc_helper-win32.cc
+++ b/src/msvc_helper-win32.cc
@@ -15,6 +15,7 @@
#include "msvc_helper.h"
#include <algorithm>
+#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <windows.h>
@@ -85,6 +86,7 @@ bool CLParser::FilterInputFilename(string line) {
bool CLParser::Parse(const string& output, const string& deps_prefix,
string* filtered_output, string* err) {
// Loop over all lines in the output to process them.
+ assert(&output != filtered_output);
size_t start = 0;
while (start < output.size()) {
size_t end = output.find_first_of("\r\n", start);