lptstr / winfetch

🛠 A command-line system information utility written in PowerShell. Like Neofetch, but for Windows.
MIT License
1.35k stars 76 forks source link

Default Values for exceeding range 0-100 in `get_percent_bar` #203

Closed Lil-Dank closed 6 months ago

Lil-Dank commented 8 months ago

More of a Temporary Fix for Issue: #181 , Where shortly after Startup the cpu_usage calculation gets a result above 100. With this change we could just simply escape the error by setting the Bar to 100% anyways.

To ensure no error occurs if range 0-100 is exceeded any value lesser than 0 gets defaulted to 0 aswell

ingenarel commented 2 months ago

this is happening to me again. image

i am using the latest version aka version 2.5.1

image

Lil-Dank commented 2 months ago

@ingenarel, This change hasnt been added to the releases yet. @rashil2000

But you can copy the changes made in this commit to your local .ps1 Script. It should be pretty straight forward