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>
This commit is contained in:
부모
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;
|
||||
}
|
||||
|
불러오는 중...
Reference in New Issue
Block a user