Skip to content

Commit

Permalink
Prevent --extra-info flag in binary mode
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimirgamalyan committed Dec 17, 2021
1 parent 4353a43 commit d9e5e7e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/FontInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,9 @@ void FontInfo::writeToTextFile(const std::string &fileName) const

void FontInfo::writeToBinFile(const std::string &fileName) const
{
if (extraInfo)
throw std::runtime_error("--extra-info flag is not compatible with binary format");

for (size_t i = 1; i < pages.size(); ++i)
if (pages[0].length() != pages[i].length())
throw std::runtime_error("texture names have different length (incompatible with bin format)");
Expand Down

0 comments on commit d9e5e7e

Please sign in to comment.