Skip to content

Commit

Permalink
fix: Add mut to fix incorrect get of windowsize in cover
Browse files Browse the repository at this point in the history
  • Loading branch information
antonnyst committed Oct 29, 2024
1 parent a5953d9 commit b92c9b6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/ui/cover.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ impl CoverView {
pub fn new(queue: Arc<Queue>, library: Arc<Library>, 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
};

Expand Down

0 comments on commit b92c9b6

Please sign in to comment.