fixed: use correct nr of columns
This commit is contained in:
parent
354e99eaf3
commit
69bd0ba7ab
1 changed files with 3 additions and 2 deletions
|
@ -402,11 +402,12 @@ void CBitVis::InitChars()
|
||||||
#define GLYPH(index, pixels)\
|
#define GLYPH(index, pixels)\
|
||||||
{\
|
{\
|
||||||
const unsigned int* pixarr = pixels;\
|
const unsigned int* pixarr = pixels;\
|
||||||
|
size_t nrcolumns = sizeof(pixels) / sizeof(pixels[0]);\
|
||||||
std::vector<unsigned int> pixelvec;\
|
std::vector<unsigned int> pixelvec;\
|
||||||
int charheight = CharHeight(pixarr, sizeof(pixels));\
|
int charheight = CharHeight(pixarr, nrcolumns);\
|
||||||
if (m_fontheight < charheight)\
|
if (m_fontheight < charheight)\
|
||||||
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]);\
|
pixelvec.push_back(pixarr[i]);\
|
||||||
\
|
\
|
||||||
m_glyphs[index].swap(pixelvec);\
|
m_glyphs[index].swap(pixelvec);\
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue