audio: fix restoring volume

Was broken by 68bbab0e42, which changed
the number of fields to scan, but not the expected return value.
This commit is contained in:
shdown
2015-07-27 15:58:06 +03:00
committed by wm4
parent 1e91750c73
commit 5c8dd832bb

View File

@@ -317,7 +317,7 @@ static void restore_volume(struct mixer *mixer)
char drv[40];
float v_l, v_r;
int m;
if (sscanf(data, "%39[^:]:%f:%f:%d", drv, &v_l, &v_r, &m) == 5) {
if (sscanf(data, "%39[^:]:%f:%f:%d", drv, &v_l, &v_r, &m) == 4) {
if (strcmp(mixer->driver, drv) == 0) {
force_vol_l = v_l;
force_vol_r = v_r;