Skip to content

fix(input): balance the draw stack on early return (A2)#43

Merged
dsent merged 1 commit into
aldum:devfrom
Vadim1987:fix/a2-input-draw-stack
Jul 9, 2026
Merged

fix(input): balance the draw stack on early return (A2)#43
dsent merged 1 commit into
aldum:devfrom
Vadim1987:fix/a2-input-draw-stack

Conversation

@Vadim1987

Copy link
Copy Markdown

The input render loop opens with gfx.push('all') and has an early return in the middle (if not tl then return end) that skips the closing gfx.pop(). Whenever that branch is taken, one graphics stack level leaks per frame until LÖVE's stack depth cap is hit. The trigger is content whose string.ulen is nil — see the companion PR for how such content gets in and for keeping it out at the model boundary; this change makes the draw scope exception-safe regardless of content, same shape as the use_canvas fix (#37).

@dsent

dsent commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

This is to replace #39

@dsent dsent requested a review from aldum July 8, 2026 19:42
@dsent dsent merged commit e738f73 into aldum:dev Jul 9, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants