From f86acbf5293377f035f8b5bd37d0b4e46e1224c4 Mon Sep 17 00:00:00 2001 From: Heyrman Toon Date: Wed, 19 Apr 2023 17:43:05 +0200 Subject: [PATCH] Correct the dimensions of the font data buffer --- examples/textoverlay/textoverlay.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/textoverlay/textoverlay.cpp b/examples/textoverlay/textoverlay.cpp index ca5cc412..282ba7a6 100644 --- a/examples/textoverlay/textoverlay.cpp +++ b/examples/textoverlay/textoverlay.cpp @@ -120,9 +120,9 @@ public: void prepareResources() { const uint32_t fontWidth = STB_FONT_consolas_24_latin1_BITMAP_WIDTH; - const uint32_t fontHeight = STB_FONT_consolas_24_latin1_BITMAP_WIDTH; + const uint32_t fontHeight = STB_FONT_consolas_24_latin1_BITMAP_HEIGHT; - static unsigned char font24pixels[fontWidth][fontHeight]; + static unsigned char font24pixels[fontHeight][fontWidth]; stb_font_consolas_24_latin1(stbFontData, font24pixels, fontHeight); // Command buffer