diff --git a/legacy/eina/ChangeLog b/legacy/eina/ChangeLog index 8862ec1daa..22d070ffd2 100644 --- a/legacy/eina/ChangeLog +++ b/legacy/eina/ChangeLog @@ -303,7 +303,3 @@ passthrough to malloc for debgging purposes and memory footrpint comparisons at runtime. -2012-06-29 Sebastian Dransfeld - - * Fix eina_file_map_lines. The function would not return the last line - of a file. diff --git a/legacy/eina/src/lib/eina_file.c b/legacy/eina/src/lib/eina_file.c index 5438aaf02c..b5dd5cdd2a 100644 --- a/legacy/eina/src/lib/eina_file.c +++ b/legacy/eina/src/lib/eina_file.c @@ -1190,6 +1190,9 @@ _eina_file_map_lines_iterator_next(Eina_Lines_Iterator *it, void **data) } it->current.line.index++; + if (it->current.line.end == it->end) + return EINA_FALSE; + eol = _eina_fine_eol(it->current.line.end, it->boundary, it->end);