Show More
@@ -22,6 +22,9 b' static void _fix_newline(PyObject *hunk,' | |||||
22 | PyObject *s = PyList_GET_ITEM(hunk, hunksz-1); |
|
22 | PyObject *s = PyList_GET_ITEM(hunk, hunksz-1); | |
23 | char *l = PyString_AS_STRING(s); |
|
23 | char *l = PyString_AS_STRING(s); | |
24 | int sz = PyString_GET_SIZE(s); |
|
24 | int sz = PyString_GET_SIZE(s); | |
|
25 | if (sz > 1 && l[sz-2] == '\r') | |||
|
26 | /* tolerate CRLF in last line */ | |||
|
27 | sz -= 1; | |||
25 | int alen = PyList_Size(a); |
|
28 | int alen = PyList_Size(a); | |
26 | int blen = PyList_Size(b); |
|
29 | int blen = PyList_Size(b); | |
27 | char c = l[0]; |
|
30 | char c = l[0]; |
General Comments 0
You need to be logged in to leave comments.
Login now