Show More
@@ -245,7 +245,7 b' static struct hunklist diff(struct line ' | |||
|
245 | 245 | |
|
246 | 246 | /* allocate and fill arrays */ |
|
247 | 247 | t = equatelines(a, an, b, bn); |
|
248 | pos = (struct pos *)calloc(bn, sizeof(struct pos)); | |
|
248 | pos = (struct pos *)calloc((bn>0)?bn:1, sizeof(struct pos)); | |
|
249 | 249 | /* we can't have more matches than lines in the shorter file */ |
|
250 | 250 | l.head = l.base = (struct hunk *)malloc(sizeof(struct hunk) * |
|
251 | 251 | ((an<bn ? an:bn) + 1)); |
General Comments 0
You need to be logged in to leave comments.
Login now