1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2024-12-26 09:37:56 +00:00

Fix Labels section in transmission-remote output. (#2597)

This commit is contained in:
Viacheslav Chimishuk 2022-02-10 18:24:13 +02:00 committed by GitHub
parent 0973cfd96d
commit 8149ff0a35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -958,13 +958,15 @@ static void printDetails(tr_variant* top)
if (tr_variantDictFindList(t, TR_KEY_labels, &l))
{
printf(" Labels: ");
size_t child_pos = 0;
tr_variant const* child;
while ((child = tr_variantListChild(l, child_pos++)))
{
if (tr_variantGetStrView(child, &sv))
{
printf(i == 0 ? "%" TR_PRIsv : ", %" TR_PRIsv, TR_PRIsv_ARG(sv));
printf(child_pos == 1 ? "%" TR_PRIsv : ", %" TR_PRIsv, TR_PRIsv_ARG(sv));
}
}