Fix out-of-bounds deque access causing build failure.

Bug: http://b/64802958
Test: built successfully

Change-Id: I8029826f0e4c7f578155d7db545e7786c76a0cdf
This commit is contained in:
Andreas Huber 2017-08-17 14:46:49 -07:00 committed by Elliott Hughes
parent b2688f4a2a
commit 113e9b1bc1

View file

@ -300,7 +300,7 @@ static void mergeGuards(std::deque<std::string>& file_lines, GuardMap& guard_map
}; };
auto nextCol = [&file_lines, &current_location, &nextLine]() { auto nextCol = [&file_lines, &current_location, &nextLine]() {
if (current_location.column == file_lines[current_location.column - 1].length()) { if (current_location.column == file_lines[current_location.line - 1].length()) {
nextLine(); nextLine();
} else { } else {
++current_location.column; ++current_location.column;