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
1 changed files with 3 additions and 1 deletions

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));
}
}