From c57721a5c9f6c95063863368d745782857b36de0 Mon Sep 17 00:00:00 2001 From: Chris Tallon Date: Mon, 15 Aug 2022 13:40:43 +0000 Subject: [PATCH] Bug fix, but was caught by other code. More efficient now. --- src/boxx.cc | 2 +- src/surfacevector.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/boxx.cc b/src/boxx.cc index 9568302..cc56866 100644 --- a/src/boxx.cc +++ b/src/boxx.cc @@ -338,7 +338,7 @@ int Boxx::drawPara(const char* text, int x, int y, const DrawStyle& colour, unsi if (charwidtharray) { thisCharWidth = charwidtharray[cur_char & 0xFF]; - if (cur_char && 0xFFFFFF00) thisCharWidth = osdv->getCharWidth(cur_char); + if (cur_char & 0xFFFFFF00) thisCharWidth = osdv->getCharWidth(cur_char); } else { diff --git a/src/surfacevector.cc b/src/surfacevector.cc index a02dd18..aec6b93 100644 --- a/src/surfacevector.cc +++ b/src/surfacevector.cc @@ -108,7 +108,7 @@ int SurfaceVector::drawText(const char* text, int x, int y, int width, const Dra float cur_shift = charwidtharray[tempo & 0xFF]; - if (tempo && 0xFFFFFF00) cur_shift = osd->getCharWidth(tempo); + if (tempo & 0xFFFFFF00) cur_shift = osd->getCharWidth(tempo); shift += cur_shift; length -= num_bytes; -- 2.39.5