aboutsummaryrefslogtreecommitdiffstats
path: root/Alsa-afb
diff options
context:
space:
mode:
Diffstat (limited to 'Alsa-afb')
-rw-r--r--Alsa-afb/Alsa-SetGet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Alsa-afb/Alsa-SetGet.c b/Alsa-afb/Alsa-SetGet.c
index 7450944..71206e6 100644
--- a/Alsa-afb/Alsa-SetGet.c
+++ b/Alsa-afb/Alsa-SetGet.c
@@ -759,8 +759,8 @@ STATIC void alsaSetGetCtls(ActionSetGetT action, afb_req request) {
else {
// Do not embed response in an array when only one ctl was requested
if (action == ACTION_GET) {
- if (queryValues.count > 1) json_object_array_add(sndctls, ctlRequest[jdx].valuesJ);
- else sndctls = ctlRequest[jdx].valuesJ;
+ if (queryValues.count == 1) sndctls = ctlRequest[jdx].valuesJ;
+ else json_object_array_add(sndctls, ctlRequest[jdx].valuesJ);
}
}
}