From 609cbc167e4fadddd8f48259262e97e75d608587 Mon Sep 17 00:00:00 2001 From: GEEKiDoS Date: Sun, 15 May 2022 13:49:59 +0800 Subject: [PATCH] Fix font generation --- src/Components/Modules/AssetInterfaces/IFont_s.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Components/Modules/AssetInterfaces/IFont_s.cpp b/src/Components/Modules/AssetInterfaces/IFont_s.cpp index 2a2d7fde..00ba3307 100644 --- a/src/Components/Modules/AssetInterfaces/IFont_s.cpp +++ b/src/Components/Modules/AssetInterfaces/IFont_s.cpp @@ -135,7 +135,10 @@ namespace Assets auto* material = builder->getAllocator()->allocate(); std::memcpy(material, Game::DB_FindXAssetHeader(Game::ASSET_TYPE_MATERIAL, "fonts/gamefonts_pc").material, sizeof(Game::Material)); - material->textureTable = builder->getAllocator()->allocate(); + auto textureTable = builder->getAllocator()->allocate(); + std::memcpy(textureTable, material->textureTable, sizeof(Game::MaterialTextureDef)); + + material->textureTable = textureTable; material->textureTable->u.image = image; material->info.name = fontName;