diff --git a/examples/client_test.cpp b/examples/client_test.cpp index 762adc007..1e1f1af0c 100644 --- a/examples/client_test.cpp +++ b/examples/client_test.cpp @@ -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 += "]";