diff --git a/cli.cpp b/cli.cpp index 51a7d924..60849a0e 100644 --- a/cli.cpp +++ b/cli.cpp @@ -699,7 +699,7 @@ bool OptionBrightness(std::vector* current_devices, std::string a { DeviceOptions* currentDevOpts = ¤t_devices->at(i); - currentDevOpts->brightness = std::clamp(std::stoi(argument), 0, (int)brightness_percentage); + currentDevOpts->brightness = std::min(std::max(std::stoi(argument), 0),(int)brightness_percentage); currentDevOpts->hasOption = true; found = true; }