diff options
author | Christian Duerr <contact@christianduerr.com> | 2017-12-19 23:53:32 +0100 |
---|---|---|
committer | Joe Wilm <jwilm@users.noreply.github.com> | 2017-12-22 13:18:08 -0800 |
commit | 32cc53a901b24a683787d3417fd635fa06a278b6 (patch) | |
tree | 8e6980c813c5bad71dedb2f3f116822f0f1a8f91 /src/input.rs | |
parent | 7f944a4d3acc40433e0608ad3c9c2dff5bd6295d (diff) | |
download | r-alacritty-32cc53a901b24a683787d3417fd635fa06a278b6.tar.gz r-alacritty-32cc53a901b24a683787d3417fd635fa06a278b6.tar.bz2 r-alacritty-32cc53a901b24a683787d3417fd635fa06a278b6.zip |
Fix stack-overflow when creating a new atlas
When an atlas is full and the `insert` call fails, a new atlas should be
created. This is the current strategy, however the atlas is put at the
end of the vector, but the `current_atlas` index is set to 0, instead of
the last element. This leads to a recursion where it keeps trying to
insert into the full atlas at position 0 instead of the new at
`atlas.len() - 1`.
With this simple fix a stack-overflow is prevented because the new atlas
is inserted as the first element, which then will be used correctly for
loading new glyphs.
This fixes jwilm/alacritty/issues/842 and might also solve
jwilm/alacritty/issues/914 (I wasn't able to reproduce this with the
latest master).
Diffstat (limited to 'src/input.rs')
0 files changed, 0 insertions, 0 deletions