Show More
@@ -31,9 +31,11 b' int bdiff_splitlines(const char *a, ssiz' | |||||
31 |
|
31 | |||
32 | /* count the lines */ |
|
32 | /* count the lines */ | |
33 | i = 1; /* extra line for sentinel */ |
|
33 | i = 1; /* extra line for sentinel */ | |
34 |
for (p = a; p < |
|
34 | for (p = a; p < plast; p++) | |
35 |
if (*p == '\n' |
|
35 | if (*p == '\n') | |
36 | i++; |
|
36 | i++; | |
|
37 | if (p == plast) | |||
|
38 | i++; | |||
37 |
|
39 | |||
38 | *lr = l = (struct bdiff_line *)malloc(sizeof(struct bdiff_line) * i); |
|
40 | *lr = l = (struct bdiff_line *)malloc(sizeof(struct bdiff_line) * i); | |
39 | if (!l) |
|
41 | if (!l) |
General Comments 0
You need to be logged in to leave comments.
Login now