bar: warn on invalid height type in configuration
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user