cpp/poppler-page.cpp |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ae2fa0be65833e7598ef5e31c2f419c52ec26ad5
Author: Albert Astals Cid <[email protected]>
Date:   Sat May 23 13:03:38 2020 +0200

    cpp: Use push back instead of [] direct access
    
    Otherwise asking for tb_font_info->glyph_to_cache_index.size() always
    returns 0

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;
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to