From 349bcc462c0eff79209ca93ab177ca0f039b15cd Mon Sep 17 00:00:00 2001 From: TopchetoEU <36534413+TopchetoEU@users.noreply.github.com> Date: Tue, 11 Oct 2022 14:38:14 +0300 Subject: [PATCH] fix: location stringification --- src/utils/location.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/utils/location.cc b/src/utils/location.cc index eb94a73..bfc2481 100644 --- a/src/utils/location.cc +++ b/src/utils/location.cc @@ -11,17 +11,17 @@ std::string location_t::to_string() const { res << filename; written_anything = true; } - if (line != -1u) { + if (line + 1 != 0) { if (written_anything) res << ':'; res << line + 1; written_anything = true; } - if (start != -1u) { + if (start + 1 != 0) { if (written_anything) res << ':'; res << start + 1; written_anything = true; } - if (length != -1u) { + if (length + 1 != 0) { if (written_anything) res << '(' << length << ')'; written_anything = true; }