Skip to content

Commit

Permalink
Fix CID 1386084 (Uninitialized scalar variable)
Browse files Browse the repository at this point in the history
The set_font method used the uninitialized member variable resolution_.

Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Apr 26, 2018
1 parent e2135de commit b87fc52
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/training/stringrenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,8 @@ Pix* CairoARGB32ToPixFormat(cairo_surface_t *surface) {

StringRenderer::StringRenderer(const std::string& font_desc, int page_width,
int page_height)
: page_width_(page_width),
: font_(font_desc),
page_width_(page_width),
page_height_(page_height),
h_margin_(50),
v_margin_(50),
Expand Down Expand Up @@ -118,7 +119,6 @@ StringRenderer::StringRenderer(const std::string& font_desc, int page_width,
total_chars_(0),
font_index_(0),
last_offset_(0) {
set_font(font_desc);
set_resolution(kDefaultOutputResolution);
}

Expand Down

0 comments on commit b87fc52

Please sign in to comment.