summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKirill Chibisov <contact@kchibisov.com>2020-01-22 01:36:44 +0300
committerChristian Duerr <contact@christianduerr.com>2020-01-21 23:36:44 +0100
commit767d59155a5d834d22ccb7c7d439b418ffad5404 (patch)
tree8fdbc7b91e548733f122eab383325340410eb0c2
parent906f14b6608480b601d08825461bd1d8eb295cfc (diff)
downloadalacritty-767d59155a5d834d22ccb7c7d439b418ffad5404.tar.gz
alacritty-767d59155a5d834d22ccb7c7d439b418ffad5404.zip
Fix stack overflow when printing shader error
Fixes #3238.
-rw-r--r--CHANGELOG.md1
-rw-r--r--alacritty/src/renderer/mod.rs6
2 files changed, 6 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index adbd2b30..a67a8303 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -34,6 +34,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Block selection starting from first column after beginning leaves the scrollback
- Incorrect selection status of the first cell when selection is off screen
- Backwards bracket selection
+- Stack overflow when printing shader creation error
### Removed
diff --git a/alacritty/src/renderer/mod.rs b/alacritty/src/renderer/mod.rs
index d5d48b43..2a1d8721 100644
--- a/alacritty/src/renderer/mod.rs
+++ b/alacritty/src/renderer/mod.rs
@@ -88,7 +88,11 @@ impl std::error::Error for Error {
impl Display for Error {
fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
- write!(f, "There was an error initializing the shaders: {}", self)
+ match self {
+ Error::ShaderCreation(err) => {
+ write!(f, "There was an error initializing the shaders: {}", err)
+ },
+ }
}
}