From 4c71f87619438a9bdf0001dbab9ef12370033698 Mon Sep 17 00:00:00 2001 From: Derek Bailey Date: Mon, 6 Feb 2023 22:08:09 -0800 Subject: [PATCH] fixed bad math for --annotate-sparse-vectors --- src/annotated_binary_text_gen.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/annotated_binary_text_gen.cpp b/src/annotated_binary_text_gen.cpp index 43c62496e..1d44803e5 100644 --- a/src/annotated_binary_text_gen.cpp +++ b/src/annotated_binary_text_gen.cpp @@ -367,18 +367,18 @@ static void GenerateSection(std::ostream &os, const BinarySection §ion, // As a space saving measure, skip generating every vector element, just put // the first and last elements in the output. Skip the whole thing if there - // are only two or fewer elements, as it doesn't save space. + // are only three or fewer elements, as it doesn't save space. if (section.type == BinarySectionType::Vector && - !output_config.include_vector_contents && section.regions.size() > 3) { + !output_config.include_vector_contents && section.regions.size() > 4) { // Generate the length region which should be first. GenerateRegion(os, section.regions[0], section, binary, output_config); // Generate the first element. GenerateRegion(os, section.regions[1], section, binary, output_config); - // Indicate that we omitted lines. + // Indicate that we omitted elements. os << std::endl - << " <" << section.regions.size() - 2 << " regions omitted>"; + << " <" << section.regions.size() - 3 << " regions omitted>"; // Generate the last element. GenerateRegion(os, section.regions.back(), section, binary, output_config);