# HG changeset patch
# User Andre Heinecke <aheinecke@intevation.de>
# Date 1395340815 0
# Node ID 00f9b91f4039cc77ef87034ca5424254f2678f86
# Parent  abc76b750ea8efdddd94b36a1c23b3cd5cb872d8
Do not leak a byte if the file is empty

diff -r abc76b750ea8 -r 00f9b91f4039 common/listutil.c
--- a/common/listutil.c	Thu Mar 20 16:58:55 2014 +0000
+++ b/common/listutil.c	Thu Mar 20 18:40:15 2014 +0000
@@ -57,7 +57,7 @@
 
     fseek(f, 0, SEEK_END);
     file_size = ftell(f);
-    if (file_size < 0){
+    if (file_size <= 0){
         fclose(f);
         return READ_FILE_UNREADABLE;
     }