diff options
author | ChunEon Park <hermet@hermet.pe.kr> | 2013-10-04 01:58:35 +0900 |
---|---|---|
committer | ChunEon Park <hermet@hermet.pe.kr> | 2013-10-04 01:58:35 +0900 |
commit | 18be4c50d9990c82ed9ce4269b7820e61f772699 (patch) | |
tree | b526ecde86529367c6710c5b8da14302602f5b09 | |
parent | 44988e4798552cd97d14c8fc87959d1442a612b9 (diff) | |
download | efl-18be4c50d9990c82ed9ce4269b7820e61f772699.tar.gz |
eina/eina_file - fix eina_file_map_lines() to not drop of one character in the last line.
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | NEWS | 1 | ||||
-rw-r--r-- | src/lib/eina/eina_file_common.c | 3 |
3 files changed, 7 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2013-10-04 ChunEon Park (Hermet) + + * Eina: fix eina_file_map_lines() to not drop of one character in the last line. + 2013-10-02 Cedric Bail * Eina: add eina_swap16(), eina_swap32(), eina_swap64(). @@ -258,6 +258,7 @@ Fixes: - Fix memory leak in eina_xattr_value_ls. - Fix magic failure in eina_value_array_count when array has not been allocated. - Fix issue when wchar_t is signed and eina_unicode does negative array lookups. + - Eina: fix eina_file_map_lines() to not drop of one character in the last line. * Eet: - Fix PPC (big endian) image codec bug. - Fix leak in eet_pbkdf2_sha1 with OpenSSL. diff --git a/src/lib/eina/eina_file_common.c b/src/lib/eina/eina_file_common.c index 5d7ef11c47..ec9cac8a6e 100644 --- a/src/lib/eina/eina_file_common.c +++ b/src/lib/eina/eina_file_common.c @@ -543,7 +543,8 @@ _eina_file_map_lines_iterator_next(Eina_Lines_Iterator *it, void **data) it->current.start = it->current.end; it->current.end = eol; - it->current.length = eol - it->current.start - 1; + it->current.length = eol - it->current.start; + if (eol < it->end) it->current.length--; *data = &it->current; return EINA_TRUE; |