From f85ae1d0e08b4eb98f303dcf654bf926c0923b8d Mon Sep 17 00:00:00 2001 From: Slavomir Kucera Date: Wed, 18 Jan 2023 14:03:32 +0100 Subject: [PATCH] fix: Language server may crash while generating the document outline --- parser_library/src/lsp/lsp_context.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser_library/src/lsp/lsp_context.cpp b/parser_library/src/lsp/lsp_context.cpp index f29aa1d63..56880df5a 100644 --- a/parser_library/src/lsp/lsp_context.cpp +++ b/parser_library/src/lsp/lsp_context.cpp @@ -272,7 +272,7 @@ bool do_not_need_nodes(const std::vector& sym, } i++; } - return false; + return i >= sym.size(); } void lsp_context::document_symbol_symbol(document_symbol_list_s& modified,