From 3ad7f4a0d68813b276cf069d2baebdfdbce2cf86 Mon Sep 17 00:00:00 2001 From: Scott Corley Date: Mon, 4 Mar 2019 20:49:19 -0600 Subject: [PATCH] Handle case when column==NULL --- src/working_files.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/working_files.cc b/src/working_files.cc index 6ba8a963..4e401b26 100644 --- a/src/working_files.cc +++ b/src/working_files.cc @@ -326,7 +326,7 @@ void WorkingFile::ComputeLineMapping() { std::optional WorkingFile::GetBufferPosFromIndexPos(int line, int *column, bool is_end) { - if (line == (int)index_lines.size() && !*column) + if (line == (int)index_lines.size() && (column == NULL || !*column)) return buffer_content.size(); if (line < 0 || line >= (int)index_lines.size()) { LOG_S(WARNING) << "bad index_line (got " << line << ", expected [0, "