9
0
Fork 0

fix a bug in the editor when reading files which do not have

a \n at the last line
This commit is contained in:
Sascha Hauer 2007-09-13 12:56:29 +02:00
parent 75ded1c394
commit 466078dbb2
1 changed files with 3 additions and 1 deletions

View File

@ -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;