fix a bug in the editor when reading files which do not have
a \n at the last line
This commit is contained in:
parent
75ded1c394
commit
466078dbb2
|
@ -205,7 +205,9 @@ static int edit_read_file(const char *path)
|
|||
if (!lineend && !*linestr)
|
||||
break;
|
||||
|
||||
*lineend = 0;
|
||||
if (lineend)
|
||||
*lineend = 0;
|
||||
|
||||
line = line_realloc(strlen(linestr) + 1, NULL);
|
||||
if (!buffer)
|
||||
buffer = line;
|
||||
|
|
Loading…
Reference in New Issue