diff options
Diffstat (limited to 'src/lib/eina/eina_file.c')
-rw-r--r-- | src/lib/eina/eina_file.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/eina/eina_file.c b/src/lib/eina/eina_file.c index ca2fe612dc..76bf062d2f 100644 --- a/src/lib/eina/eina_file.c +++ b/src/lib/eina/eina_file.c @@ -332,12 +332,14 @@ _eina_file_map_populate(char *map, unsigned int size, Eina_Bool hugetlb) unsigned int i; unsigned int s; + if (size == 0) return 0; + s = hugetlb ? EINA_HUGE_PAGE : EINA_SMALL_PAGE; for (i = 0; i < size; i += s) r ^= map[i]; - r ^= map[size]; + r ^= map[size - 1]; return r; } |