We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9144ae commit e15cae9Copy full SHA for e15cae9
src/client/fontengine.cpp
@@ -342,8 +342,9 @@ gui::IGUIFont *FontEngine::initSimpleFont(const FontSpec &spec)
342
(spec.mode == FM_SimpleMono) ? "mono_font_path" : "font_path");
343
344
size_t pos_dot = font_path.find_last_of('.');
345
- std::string basename = font_path;
346
- std::string ending = lowercase(font_path.substr(pos_dot));
+ std::string basename = font_path, ending;
+ if (pos_dot != std::string::npos)
347
+ ending = lowercase(font_path.substr(pos_dot));
348
349
if (ending == ".ttf") {
350
errorstream << "FontEngine: Found font \"" << font_path
0 commit comments