mirror of
https://github.com/MaskRay/ccls.git
synced 2025-06-08 01:04:54 +00:00
Handle case when column==NULL
This commit is contained in:
parent
d3a3bcef34
commit
3ad7f4a0d6
@ -326,7 +326,7 @@ void WorkingFile::ComputeLineMapping() {
|
|||||||
|
|
||||||
std::optional<int> WorkingFile::GetBufferPosFromIndexPos(int line, int *column,
|
std::optional<int> WorkingFile::GetBufferPosFromIndexPos(int line, int *column,
|
||||||
bool is_end) {
|
bool is_end) {
|
||||||
if (line == (int)index_lines.size() && !*column)
|
if (line == (int)index_lines.size() && (column == NULL || !*column))
|
||||||
return buffer_content.size();
|
return buffer_content.size();
|
||||||
if (line < 0 || line >= (int)index_lines.size()) {
|
if (line < 0 || line >= (int)index_lines.size()) {
|
||||||
LOG_S(WARNING) << "bad index_line (got " << line << ", expected [0, "
|
LOG_S(WARNING) << "bad index_line (got " << line << ", expected [0, "
|
||||||
|
Loading…
Reference in New Issue
Block a user