summaryrefslogtreecommitdiffstats
path: root/src/render/Font.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-01-22 00:56:47 +0100
committerSergeanur <s.anureev@yandex.ua>2021-01-22 00:56:47 +0100
commit9d2509ab5bcd8488b3f803e04c1c5c3d206e59e7 (patch)
tree02ad16091387074129084cd89643b41bffde79b0 /src/render/Font.cpp
parentMerge branch 'lcs' into lcsfont (diff)
downloadre3-9d2509ab5bcd8488b3f803e04c1c5c3d206e59e7.tar
re3-9d2509ab5bcd8488b3f803e04c1c5c3d206e59e7.tar.gz
re3-9d2509ab5bcd8488b3f803e04c1c5c3d206e59e7.tar.bz2
re3-9d2509ab5bcd8488b3f803e04c1c5c3d206e59e7.tar.lz
re3-9d2509ab5bcd8488b3f803e04c1c5c3d206e59e7.tar.xz
re3-9d2509ab5bcd8488b3f803e04c1c5c3d206e59e7.tar.zst
re3-9d2509ab5bcd8488b3f803e04c1c5c3d206e59e7.zip
Diffstat (limited to '')
-rw-r--r--src/render/Font.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/render/Font.cpp b/src/render/Font.cpp
index 23df459e..b559ca7a 100644
--- a/src/render/Font.cpp
+++ b/src/render/Font.cpp
@@ -538,7 +538,7 @@ CFont::PrintString(float x, float y, uint32, wchar *start, wchar *end, float spw
Details.bIsShadow = false;
}
}
- if (FontRenderStatePointer.pStr >= (wchar*)&FontRenderStateBuf[ARRAY_SIZE(FontRenderStateBuf)] - (end - start + 26)) // why 26?
+ if ((uintptr)FontRenderStatePointer.pStr >= (uintptr)&FontRenderStateBuf[ARRAY_SIZE(FontRenderStateBuf)] - sizeof(wchar) * (end - start + 2) - sizeof(CFontRenderState))
RenderFontBuffer();
CFontRenderState *pRenderState = FontRenderStatePointer.pRenderState;
pRenderState->fTextPosX = x;