From 90c99910b69f5282fea137bae236cd9ad0d6b0c9 Mon Sep 17 00:00:00 2001 From: Jack Andersen Date: Sun, 29 Nov 2015 20:06:45 -1000 Subject: [PATCH] fixed annoyances --- specter/lib/FontCache.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/specter/lib/FontCache.cpp b/specter/lib/FontCache.cpp index 07037c430..2ce720b52 100644 --- a/specter/lib/FontCache.cpp +++ b/specter/lib/FontCache.cpp @@ -218,10 +218,7 @@ static bool ReadDecompressed(Athena::io::FileReader& reader, atUint8* data, size } inflateEnd(&z); - - if (adler32 != z.adler) - return false; - return true; + return adler32 == z.adler; } FontAtlas::FontAtlas(boo::IGraphicsDataFactory* gf, FT_Face face, uint32_t dpi, @@ -300,7 +297,7 @@ FontAtlas::FontAtlas(boo::IGraphicsDataFactory* gf, FT_Face face, uint32_t dpi, else { size_t count = TEXMAP_DIM * totalHeight; - texmap.reset(new RgbaPixel[TEXMAP_DIM * totalHeight]); + texmap.reset(new RgbaPixel[count]); bufSz = count * sizeof(RgbaPixel); memset(texmap.get(), 0, bufSz); } @@ -375,7 +372,7 @@ FontAtlas::FontAtlas(boo::IGraphicsDataFactory* gf, FT_Face face, uint32_t dpi, else { size_t count = TEXMAP_DIM * totalHeight; - texmap.reset(new GreyPixel[TEXMAP_DIM * totalHeight]); + texmap.reset(new GreyPixel[count]); bufSz = count * sizeof(GreyPixel); memset(texmap.get(), 0, bufSz); }