]> git.mxchange.org Git - simgear.git/blobdiff - simgear/timing/timezone.cxx
Use the original filename for the compressed image message.
[simgear.git] / simgear / timing / timezone.cxx
index 7f09e6c6796e5896a2456ee13380887a32f41f5e..26174c7538f513d3c27333ee6bb1b0d7215bf3d6 100644 (file)
  *
  ************************************************************************/
 
+#ifdef HAVE_CONFIG_H
+#  include <simgear_config.h>
+#endif
+
 #include <errno.h>
 #include <string.h>
 #include <stdio.h>
@@ -139,7 +143,8 @@ SGTimeZoneContainer::SGTimeZoneContainer(const char *filename)
     errno = 0;
 
     while (1) {
-        fgets(buffer, 256, infile);
+        if (0 == fgets(buffer, 256, infile))
+            break;
         if (feof(infile)) {
             break;
         }