The recent change to reject leading '+' in pa_atod() broke the
relative volume parsing in pactl. This fixes that.
static int parse_volume(const char *vol_spec, pa_volume_t *vol, enum volume_flags *vol_flags) {
double v;
char *vs;
+ const char *atod_input;
pa_assert(vol_spec);
pa_assert(vol);
vs[strlen(vs)-2] = 0;
}
- if (pa_atod(vs, &v) < 0) {
+ atod_input = vs;
+
+ if (atod_input[0] == '+')
+ atod_input++; /* pa_atod() doesn't accept leading '+', so skip it. */
+
+ if (pa_atod(atod_input, &v) < 0) {
pa_log(_("Invalid volume specification"));
pa_xfree(vs);
return -1;