ssdiff: correctly manage tab expansion

Previously, replace_tabs("foo\tbar") would become "        foobar".

Signed-off-by: Julius Plenz <plenz@cis.fu-berlin.de>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Αυτή η υποβολή περιλαμβάνεται σε:
Julius Plenz 2012-11-15 17:35:06 +01:00 υποβλήθηκε από Jason A. Donenfeld
γονέας b1e172acca
υποβολή 225c8aba31

@ -138,9 +138,8 @@ static char *replace_tabs(char *line)
strcat(result, prev_buf);
break;
} else {
strcat(result, " ");
strncat(result, spaces, 8 - (strlen(result) % 8));
strncat(result, prev_buf, cur_buf - prev_buf);
strncat(result, spaces, 8 - (strlen(result) % 8));
}
prev_buf = cur_buf + 1;
}