Skip to content

Commit

Permalink
Font Renderer|Fixed: Attribute stack depth push was off-by-one
Browse files Browse the repository at this point in the history
This allowed the attribute stack to be pushed deeper than the stack
supported, resulting in subsequent stack writes to overflow.
  • Loading branch information
danij-deng committed Feb 12, 2012
1 parent bd19127 commit 9e2c6e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doomsday/engine/portable/src/rend_font.c
Expand Up @@ -220,7 +220,7 @@ void FR_LoadDefaultAttrib(void)
void FR_PushAttrib(void)
{
errorIfNotInited("FR_PushAttrib");
if(fr.attribStackDepth == FR_MAX_ATTRIB_STACK_DEPTH)
if(fr.attribStackDepth+1 == FR_MAX_ATTRIB_STACK_DEPTH)
{
Con_Error("FR_PushAttrib: STACK_OVERFLOW.");
exit(1); // Unreachable.
Expand Down

0 comments on commit 9e2c6e0

Please sign in to comment.