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 committed by toaster
parent 8ef8cb5b5f
commit 18f0ece073

View file

@ -1719,6 +1719,8 @@ static void CON_DrawHudlines(void)
p++;
c++;
}
if (c >= con_width)
break;
if (*p < HU_FONTSTART)
;//charwidth = 4 * con_scalefactor;
else
@ -1841,6 +1843,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);
}
}