Show More
@@ -229,7 +229,8 b' static struct hunklist diff(struct line ' | |||
|
229 | 229 | /* allocate and fill arrays */ |
|
230 | 230 | t = equatelines(a, an, b, bn); |
|
231 | 231 | pos = calloc(bn, sizeof(struct pos)); |
|
232 | l.head = l.base = malloc(sizeof(struct hunk) * ((an + bn) / 4 + 2)); | |
|
232 | /* we can't have more matches than lines in the shorter file */ | |
|
233 | l.head = l.base = malloc(sizeof(struct hunk) * ((an<bn ? an:bn) + 1)); | |
|
233 | 234 | |
|
234 | 235 | if (pos && l.base && t) { |
|
235 | 236 | /* generate the matching block list */ |
General Comments 0
You need to be logged in to leave comments.
Login now