Skip to content

Commit

Permalink
Merge branch 'fontainofdreams' into 'master'
Browse files Browse the repository at this point in the history
Allow bitmap font texture reading to end prematurely (#8378)

See merge request OpenMW/openmw!4564
  • Loading branch information
psi29a committed Mar 5, 2025
2 parents 1e0bdcc + 24468fd commit 8884150
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion components/fontloader/fontloader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,8 @@ namespace Gui
textureData.resize(width * height * 4);
bitmapFile->read(textureData.data(), width * height * 4);
if (!bitmapFile->good())
fail(*bitmapFile, bitmapFilename, "File too small to be a valid bitmap");
Log(Debug::Warning) << "Font bitmap " << bitmapFilename << " ended prematurely, using partial data ("
<< bitmapFile->gcount() << "/" << (width * height * 4) << " bytes)";
bitmapFile.reset();

MyGUI::ITexture* tex = MyGUI::RenderManager::getInstance().createTexture(bitmapFilename);
Expand Down

0 comments on commit 8884150

Please sign in to comment.