summaryrefslogtreecommitdiff
path: root/plugins/FloatingContacts/src/bitmap_funcs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/FloatingContacts/src/bitmap_funcs.cpp')
-rw-r--r--plugins/FloatingContacts/src/bitmap_funcs.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/plugins/FloatingContacts/src/bitmap_funcs.cpp b/plugins/FloatingContacts/src/bitmap_funcs.cpp
index c6ed9cfc34..05223da683 100644
--- a/plugins/FloatingContacts/src/bitmap_funcs.cpp
+++ b/plugins/FloatingContacts/src/bitmap_funcs.cpp
@@ -768,9 +768,9 @@ void MyBitmap::DrawText(wchar_t *str, int x, int y, int blur, int strength)
mx = (uint8_t)(max(max(bx, rx), gx));
if (1) {
- bx = (bx < mx) ? (uint8_t)(((WORD)bx * 7 + (WORD)mx) >> 3) : bx;
- rx = (rx < mx) ? (uint8_t)(((WORD)rx * 7 + (WORD)mx) >> 3) : rx;
- gx = (gx < mx) ? (uint8_t)(((WORD)gx * 7 + (WORD)mx) >> 3) : gx;
+ bx = (bx < mx) ? (uint8_t)(((uint16_t)bx * 7 + (uint16_t)mx) >> 3) : bx;
+ rx = (rx < mx) ? (uint8_t)(((uint16_t)rx * 7 + (uint16_t)mx) >> 3) : rx;
+ gx = (gx < mx) ? (uint8_t)(((uint16_t)gx * 7 + (uint16_t)mx) >> 3) : gx;
// reduce boldeness at white fonts
}
COLOR32 cl = row_dst[j];