Commit 3da7ecfa authored by Max Kellermann's avatar Max Kellermann

mixer/pulse: add missing ParseFloat() check

parent 5bb02bbd
......@@ -175,7 +175,7 @@ parse_volume_scale_factor(const char *value) {
char *endptr;
float factor = ParseFloat(value, &endptr);
if (*endptr != '\0' || factor < 0.5 || factor > 5.0)
if (endptr == value || *endptr != '\0' || factor < 0.5 || factor > 5.0)
throw FormatRuntimeError("\"%s\" is not a number in the "
"range 0.5 to 5.0",
value);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment