From 69bd0ba7ab363582ec03b86caf5c41b86bf1f0a1 Mon Sep 17 00:00:00 2001 From: Bob van Loosen Date: Thu, 20 Dec 2012 20:22:41 +0100 Subject: [PATCH] fixed: use correct nr of columns --- src/bitvis.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bitvis.cpp b/src/bitvis.cpp index f5f5a3d..2082d88 100644 --- a/src/bitvis.cpp +++ b/src/bitvis.cpp @@ -402,11 +402,12 @@ void CBitVis::InitChars() #define GLYPH(index, pixels)\ {\ const unsigned int* pixarr = pixels;\ + size_t nrcolumns = sizeof(pixels) / sizeof(pixels[0]);\ std::vector pixelvec;\ - int charheight = CharHeight(pixarr, sizeof(pixels));\ + int charheight = CharHeight(pixarr, nrcolumns);\ if (m_fontheight < charheight)\ m_fontheight = charheight;\ - for (size_t i = 0; i < sizeof(pixels) / sizeof(pixels[0]); i++)\ + for (size_t i = 0; i < nrcolumns; i++)\ pixelvec.push_back(pixarr[i]);\ \ m_glyphs[index].swap(pixelvec);\