Fixed compiler warning on newer Linux systems.

(transplanted from 3ab4702d6313b2590f202f1475cd68976765f02f)
This commit is contained in:
Ryan C. Gordon 2010-02-01 03:02:18 -05:00
parent 8ff89ca115
commit 5db500ac4e
1 changed files with 3 additions and 1 deletions

View File

@ -1066,7 +1066,9 @@ static void open_history_file(void)
do
{
fgets(buf, sizeof (buf), f);
if (fgets(buf, sizeof (buf), f) == NULL)
break;
if (buf[strlen(buf) - 1] == '\n')
buf[strlen(buf) - 1] = '\0';
add_history(buf);