[gimp/metadata-browser] plug-ins: actually use the return value of fread() in gimppressionist/presets



commit efc02088dff852e0da8b8da945c2d0013432b8c1
Author: Michael Natterer <mitch gimp org>
Date:   Sun Feb 5 22:28:09 2012 +0100

    plug-ins: actually use the return value of fread() in gimppressionist/presets

 plug-ins/gimpressionist/presets.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plug-ins/gimpressionist/presets.c b/plug-ins/gimpressionist/presets.c
index 56effca..4fac07f 100644
--- a/plug-ins/gimpressionist/presets.c
+++ b/plug-ins/gimpressionist/presets.c
@@ -253,7 +253,7 @@ load_old_preset (const gchar *fname)
   len = fread (&pcvals, 1, sizeof (pcvals), f);
   fclose (f);
 
-  return 0;
+  return (len != sizeof (pcvals)) ? -1 : 0;
 }
 
 static unsigned int



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]