From 90db24c3561d7b9b177944e2cb14be3ff7fc3ab4 Mon Sep 17 00:00:00 2001 From: Jupeyy Date: Mon, 19 Oct 2020 14:18:23 +0200 Subject: [PATCH] clamp font size to atleast 2 (fixes #3145) --- src/game/client/components/mapimages.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/game/client/components/mapimages.cpp b/src/game/client/components/mapimages.cpp index 2336f3a78..a90679e03 100644 --- a/src/game/client/components/mapimages.cpp +++ b/src/game/client/components/mapimages.cpp @@ -465,6 +465,7 @@ void CMapImages::UpdateEntityLayerText(void *pTexBuffer, int ImageColorChannelCo void CMapImages::InitOverlayTextures() { int TextureSize = 64 * m_TextureScale / 100; + TextureSize = clamp(TextureSize, 2, 64); int TextureToVerticalCenterOffset = (64 - TextureSize) / 2; // should be used to move texture to the center of 64 pixels area if(m_OverlayBottomTexture == -1)