Handle case when column==NULL

This commit is contained in:
Scott Corley 2019-03-04 20:49:19 -06:00
parent d3a3bcef34
commit 3ad7f4a0d6

View File

@ -326,7 +326,7 @@ void WorkingFile::ComputeLineMapping() {
std::optional<int> 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, "