Fix for issue #77
This commit is contained in:
parent
9b7e6db906
commit
f662000414
1 changed files with 2 additions and 1 deletions
|
@ -772,12 +772,13 @@ std::unique_ptr<Emboss::FontFile> Emboss::create_font_file(
|
|||
|
||||
std::unique_ptr<Emboss::FontFile> Emboss::create_font_file(const char *file_path)
|
||||
{
|
||||
FILE *file = fopen(file_path, "rb");
|
||||
FILE *file = std::fopen(file_path, "rb");
|
||||
if (file == nullptr) {
|
||||
assert(false);
|
||||
BOOST_LOG_TRIVIAL(error) << "Couldn't open " << file_path << " for reading.";
|
||||
return nullptr;
|
||||
}
|
||||
ScopeGuard sg([&file]() { std::fclose(file); });
|
||||
|
||||
// find size of file
|
||||
if (fseek(file, 0L, SEEK_END) != 0) {
|
||||
|
|
Loading…
Reference in a new issue