diff --git a/src/Font.cpp b/src/Font.cpp index 467306f7..bf0540a5 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -1138,7 +1138,7 @@ void DrawText(Font *font, RenderBackend_Surface *surface, int x, int y, unsigned { if (font != NULL && surface != NULL) { - RenderBackend_PrepareToDrawGlyphs(font->atlas, surface, (unsigned char)colour, (unsigned char)(colour >> 8), (unsigned char)(colour >> 16)); + RenderBackend_PrepareToDrawGlyphs(font->atlas, surface, colour & 0xFF, (colour >> 8) & 0xFF, (colour >> 16) & 0xFF); size_t pen_x = 0;