From 611ed0e348eab5440b214487d3de853eb4c1d0fb Mon Sep 17 00:00:00 2001 From: Michael Carlberg Date: Sun, 1 Jan 2017 04:00:35 +0100 Subject: [PATCH] fix(battery): Cap value of full-at --- src/modules/battery.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/battery.cpp b/src/modules/battery.cpp index 5dafbda1..1bc42452 100644 --- a/src/modules/battery.cpp +++ b/src/modules/battery.cpp @@ -25,7 +25,7 @@ namespace modules { battery_module::battery_module(const bar_settings& bar, string name_) : inotify_module(bar, move(name_)) { // Load configuration values - m_fullat = m_conf.get(name(), "full-at", m_fullat); + m_fullat = math_util::min(m_conf.get(name(), "full-at", m_fullat), 100); m_interval = m_conf.get(name(), "poll-interval", 5s); m_lastpoll = chrono::system_clock::now();