Skip to content

Commit

Permalink
Fixed access to uninitialized variable
Browse files Browse the repository at this point in the history
Coverity ID: 1386084 the set_font method has accessed resolution_ before it was initialized by the set_resolution method.

Signed-off-by: Noah Metzger <noah.metzger@bib.uni-mannheim.de>
  • Loading branch information
noahmetzger committed May 2, 2018
1 parent 984a981 commit a7d1402
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/training/stringrenderer.cpp
Expand Up @@ -120,6 +120,7 @@ StringRenderer::StringRenderer(const std::string& font_desc, int page_width,
font_index_(0),
last_offset_(0) {
set_resolution(kDefaultOutputResolution);
set_font(font_desc);
}

bool StringRenderer::set_font(const std::string& desc) {
Expand Down

0 comments on commit a7d1402

Please sign in to comment.