summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr-c-f <ryan.farley@gmx.com>2021-01-11 06:42:06 -0600
committerChristian Duerr <contact@christianduerr.com>2021-02-14 20:43:13 +0000
commit9ddd660da1344b07a6710ffa0ed77757333493f2 (patch)
treedcff417abc665dc7c0e37dca248d4102c45ad6b4
parenta852eb85d57a9c966cea20063923444c18d63c54 (diff)
downloadalacritty-9ddd660da1344b07a6710ffa0ed77757333493f2.tar.gz
alacritty-9ddd660da1344b07a6710ffa0ed77757333493f2.zip
Fix assertion crash on 32-bit systems
Fixes #4687.
-rw-r--r--CHANGELOG.md6
-rw-r--r--alacritty_terminal/src/grid/storage.rs2
2 files changed, 7 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index a66032eb..9df5b3ee 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,12 @@ The sections should follow the order `Packaging`, `Added`, `Changed`, `Fixed` an
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
+## 0.8.0-dev
+
+### Fixed
+
+- Crash due to assertion failure on 32-bit architectures
+
## 0.7.1
### Fixed
diff --git a/alacritty_terminal/src/grid/storage.rs b/alacritty_terminal/src/grid/storage.rs
index a7d4adcf..f9c4b2cf 100644
--- a/alacritty_terminal/src/grid/storage.rs
+++ b/alacritty_terminal/src/grid/storage.rs
@@ -156,7 +156,7 @@ impl<T> Storage<T> {
/// instructions. This implementation achieves the swap in only 8 movups
/// instructions.
pub fn swap(&mut self, a: usize, b: usize) {
- debug_assert_eq!(std::mem::size_of::<Row<T>>(), 32);
+ debug_assert_eq!(mem::size_of::<Row<T>>(), mem::size_of::<usize>() * 4);
let a = self.compute_index(a);
let b = self.compute_index(b);