Skip to content

Conversation

@patrick96
Copy link
Member

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Other: Replace this with a description of the type of this PR

Description

Since 3.5.0, we use m_interval for a modulo operation, this crashes the
bar if the interval is 0. A non-positive interval shouldn't be allowed
anyway, so we now throw an exception in that case.

Related Issues & Documents

Fixes #2273

Documentation (check all applicable)

  • This PR requires changes to the Wiki documentation (describe the changes)
  • This PR requires changes to the documentation inside the git repo (please add them to the PR).
  • Does not require documentation changes

Since 3.5.0, we use m_interval for a modulo operation, this crashes the
bar if the interval is 0. A non-positive interval shouldn't be allowed
anyway, so we now throw an exception in that case.

Fixes polybar#2273
@patrick96 patrick96 added this to the 3.5.1 Hotfix milestone Dec 5, 2020
@codecov
Copy link

codecov bot commented Dec 5, 2020

Codecov Report

Merging #2274 (c1c1413) into hotfix/3.5.1 (3d6a7ff) will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@               Coverage Diff               @@
##           hotfix/3.5.1   #2274      +/-   ##
===============================================
- Coverage          7.34%   7.33%   -0.02%     
===============================================
  Files               155     155              
  Lines             10596   10612      +16     
===============================================
  Hits                778     778              
- Misses             9818    9834      +16     
Flag Coverage Δ
unittests 7.33% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
include/modules/meta/timer_module.hpp 0.00% <0.00%> (ø)
src/modules/counter.cpp 0.00% <0.00%> (ø)
src/modules/cpu.cpp 0.00% <0.00%> (ø)
src/modules/date.cpp 0.00% <0.00%> (ø)
src/modules/fs.cpp 0.00% <0.00%> (ø)
src/modules/github.cpp 0.00% <0.00%> (ø)
src/modules/memory.cpp 0.00% <0.00%> (ø)
src/modules/network.cpp 0.00% <0.00%> (ø)
src/modules/temperature.cpp 0.00% <0.00%> (ø)
src/components/config.cpp 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3d6a7ff...c1c1413. Read the comment docs.

@patrick96 patrick96 merged commit 82ebad5 into polybar:hotfix/3.5.1 Dec 5, 2020
@patrick96 patrick96 deleted the fix/interval-0 branch December 5, 2020 21:58
patrick96 added a commit that referenced this pull request Dec 12, 2020
Changelog

**Features**

* config: Multiple inheritance (#2271), see #2269

**Fixes**

* (#2285), see #770, #2289
* Timer module: Polybar crash when interval is set to 0 (#2274), see #2273
* `custom/menu`: Wrong level numbers in error messages (#2264)
* `internal/xworkspaces`: Ignored certain workspace updates (#2275), see #2272
* Logger: Undefined behavior (#2284)
* build:
    * Build issues in older clang versions (#2270, #2279, #2280)
@patrick96 patrick96 mentioned this pull request Dec 12, 2020
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant