Skip to content
Snippets Groups Projects
Commit c3d5740e authored by James Hale's avatar James Hale
Browse files

Fix console text bleeding edge case

A single character could prematurely read if there were enough special characters to push 'c' past 'con_width'.
parent 6267abac
No related branches found
No related tags found
Loading
...@@ -1654,6 +1654,8 @@ static void CON_DrawHudlines(void) ...@@ -1654,6 +1654,8 @@ static void CON_DrawHudlines(void)
p++; p++;
c++; c++;
} }
if (c >= con_width)
break;
if (*p < HU_FONTSTART) if (*p < HU_FONTSTART)
;//charwidth = 4 * con_scalefactor; ;//charwidth = 4 * con_scalefactor;
else else
...@@ -1777,6 +1779,8 @@ static void CON_DrawConsole(void) ...@@ -1777,6 +1779,8 @@ static void CON_DrawConsole(void)
p++; p++;
c++; c++;
} }
if (c >= con_width)
break;
V_DrawCharacter(x, y, (INT32)(*p) | charflags | cv_constextsize.value | V_NOSCALESTART, true); V_DrawCharacter(x, y, (INT32)(*p) | charflags | cv_constextsize.value | V_NOSCALESTART, true);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment