Show More
@@ -31,8 +31,10 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++; | |||
|
37 | if (p == plast) | |||
36 |
|
|
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); |
General Comments 0
You need to be logged in to leave comments.
Login now