diff --git a/plugins/builtin/source/content/init_tasks.cpp b/plugins/builtin/source/content/init_tasks.cpp index 29c5c06fb..41c709db0 100644 --- a/plugins/builtin/source/content/init_tasks.cpp +++ b/plugins/builtin/source/content/init_tasks.cpp @@ -7,7 +7,9 @@ #include #include #include +#include +#include #include #include @@ -250,7 +252,8 @@ namespace hex::plugin::builtin { ranges.push_back(fontRange); - std::strncpy(cfg.Name, font.name.c_str(), sizeof(cfg.Name)); + cfg.Name = { 0x00 }; + std::strncpy(cfg.Name, font.name.c_str(), sizeof(cfg.Name) - 1); cfg.GlyphOffset = { font.offset.x, font.offset.y }; fonts->AddFontFromMemoryTTF(font.fontData.data(), int(font.fontData.size()), 0, &cfg, ranges.back().Data); }