From 113e9b1bc146f945274fa5b5088ebf45ea0b37d8 Mon Sep 17 00:00:00 2001 From: Andreas Huber Date: Thu, 17 Aug 2017 14:46:49 -0700 Subject: [PATCH] Fix out-of-bounds deque access causing build failure. Bug: http://b/64802958 Test: built successfully Change-Id: I8029826f0e4c7f578155d7db545e7786c76a0cdf --- tools/versioner/src/Preprocessor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/versioner/src/Preprocessor.cpp b/tools/versioner/src/Preprocessor.cpp index 757a3922c..a7f289b1f 100644 --- a/tools/versioner/src/Preprocessor.cpp +++ b/tools/versioner/src/Preprocessor.cpp @@ -300,7 +300,7 @@ static void mergeGuards(std::deque& file_lines, GuardMap& guard_map }; auto nextCol = [&file_lines, ¤t_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(); } else { ++current_location.column;