Fix console text bleeding edge case

A single character could prematurely read if there were enough special characters to push 'c' past 'con_width'.
This commit is contained in:
SwitchKaze 2021-04-06 15:06:44 -05:00
parent 6267abac8a
commit c3d5740e98

View file

@ -1654,6 +1654,8 @@ static void CON_DrawHudlines(void)
p++;
c++;
}
if (c >= con_width)
break;
if (*p < HU_FONTSTART)
;//charwidth = 4 * con_scalefactor;
else
@ -1777,6 +1779,8 @@ static void CON_DrawConsole(void)
p++;
c++;
}
if (c >= con_width)
break;
V_DrawCharacter(x, y, (INT32)(*p) | charflags | cv_constextsize.value | V_NOSCALESTART, true);
}
}