diff --git a/CHANGELOG.md b/CHANGELOG.md index 85dab696..5c767e89 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Fixed + +- Fix error in fetching of window size leading to crashes with cover feature + ## [1.2.0] - 2024-10-15 ### Added diff --git a/src/ui/cover.rs b/src/ui/cover.rs index 4466841f..f5827c32 100644 --- a/src/ui/cover.rs +++ b/src/ui/cover.rs @@ -33,8 +33,8 @@ impl CoverView { pub fn new(queue: Arc, library: Arc, config: &Config) -> Self { // Determine size of window both in pixels and chars let (rows, cols, mut xpixels, mut ypixels) = unsafe { - let query: (u16, u16, u16, u16) = (0, 0, 0, 0); - ioctl(1, TIOCGWINSZ, &query); + let mut query: (u16, u16, u16, u16) = (0, 0, 0, 0); + ioctl(1, TIOCGWINSZ, &mut query); query };