diff common/listutil.c @ 89:00f9b91f4039

Do not leak a byte if the file is empty
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 20 Mar 2014 18:40:15 +0000
parents 6f1a73575c99
children 4980b0deb773
line wrap: on
line diff
--- 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;
     }

http://wald.intevation.org/projects/trustbridge/