Skip to content

Commit 44f0435

Browse files
committed
xrEngine/GameFont.cpp: Fixed out-of-loop variable usage.
1 parent 8efd655 commit 44f0435

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/xrEngine/GameFont.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,8 @@ u16 CGameFont::GetCutLengthPos(float fTargetWidth, const char* pszText)
216216

217217
u16 len = mbhMulti2Wide(wsStr, wsPos, MAX_MB_CHARS, pszText);
218218

219-
for (u16 i = 1; i <= len; i++)
219+
u16 i = 1;
220+
for (; i <= len; i++)
220221
{
221222

222223
fDelta = GetCharTC(wsStr[i]).z - 2;

0 commit comments

Comments
 (0)