From 0332da0cef5080f31ca6a901a9ca3ea8e11da59f Mon Sep 17 00:00:00 2001 From: Visal Vijay Date: Wed, 25 Mar 2026 15:18:00 +0530 Subject: [PATCH] bar: warn on invalid height type in configuration --- src/bar.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bar.cpp b/src/bar.cpp index 6a78707e..fe66b806 100644 --- a/src/bar.cpp +++ b/src/bar.cpp @@ -172,6 +172,10 @@ waybar::Bar::Bar(struct waybar_output* w_output, const Json::Value& w_config) right_.set_spacing(spacing); } + if (config.isMember("height") && !config["height"].isUInt()) { + spdlog::warn("Invalid type for 'height', expected unsigned integer"); + } + height_ = config["height"].isUInt() ? config["height"].asUInt() : 0; width_ = config["width"].isUInt() ? config["width"].asUInt() : 0;