summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2020-05-23 13:03:38 +0200
committerAlbert Astals Cid <aacid@kde.org>2020-05-23 13:03:38 +0200
commitae2fa0be65833e7598ef5e31c2f419c52ec26ad5 (patch)
tree4136cdf0817bebf964852c61324d95e03b2df2c8
parent12dea6841940ce31630d60fa7c892da4597393aa (diff)
cpp: Use push back instead of [] direct access
Otherwise asking for tb_font_info->glyph_to_cache_index.size() always returns 0
-rw-r--r--cpp/poppler-page.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/poppler-page.cpp b/cpp/poppler-page.cpp
index 8e005ee8..b0b75242 100644
--- a/cpp/poppler-page.cpp
+++ b/cpp/poppler-page.cpp
@@ -475,7 +475,7 @@ std::vector<text_box> page::text_list(int opt_flag) const
tb_font_info->wmodes.push_back(text_box::invalid_wmode);
};
- tb_font_info->glyph_to_cache_index[j] = -1;
+ tb_font_info->glyph_to_cache_index.push_back(-1);
for (size_t k = 0; k < tb_font_info->font_info_cache.size(); k++) {
if (cur_text_font_info->matches(&(tb_font_info->font_info_cache[k].d->ref))) {
tb_font_info->glyph_to_cache_index[j] = k;