fix bug in piece printing in client_test

This commit is contained in:
Arvid Norberg 2015-05-30 06:11:41 +00:00
parent 945eef4c4d
commit 85d1d9c85e
1 changed files with 3 additions and 1 deletions

View File

@ -1180,12 +1180,14 @@ void print_piece(libtorrent::partial_piece_info* pp
else { color = esc("0"); chr = ' '; }
}
if (last_color == 0 || strcmp(last_color, color) != 0)
{
snprintf(str, sizeof(str), "%s%c", color, chr);
out += str;
}
else
out += chr;
last_color = color;
out += str;
}
out += esc("0");
out += "]";