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();