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:
1 parent
1e91750c73
commit
5c8dd832bb
1 file changed
+1
-1
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user