From 202f04d0096836153d004007587151ca7fab4c60 Mon Sep 17 00:00:00 2001 From: Tyler Wilding Date: Fri, 13 Aug 2021 21:57:46 -0400 Subject: [PATCH] goalc: fix off-by-one in line number reference --- common/goos/TextDB.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/goos/TextDB.cpp b/common/goos/TextDB.cpp index 3a274741df..d3213d286e 100644 --- a/common/goos/TextDB.cpp +++ b/common/goos/TextDB.cpp @@ -135,7 +135,7 @@ std::string TextDb::get_info_for(const Object& o, bool* terminate_compiler_error */ std::string TextDb::get_info_for(const std::shared_ptr& frag, int offset) const { std::string result = "text from " + frag->get_description() + - ", line: " + std::to_string(frag->get_line_idx(offset) + 1) + "\n"; + ", line: " + std::to_string(frag->get_line_idx(offset)) + "\n"; result += frag->get_line_containing_offset(offset) + "\n"; return result; }