X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=simgear%2Ftiming%2Ftimezone.cxx;h=4fa6746ca2cd742fc245a10bb440606d7207fd3c;hb=1f585d67199896749f5f532657d17afe586f6615;hp=118849184b40e3b493d2250ce31e221e443f5858;hpb=110753e92c4d512432b93d8789348a54341dec98;p=simgear.git diff --git a/simgear/timing/timezone.cxx b/simgear/timing/timezone.cxx index 11884918..4fa6746c 100644 --- a/simgear/timing/timezone.cxx +++ b/simgear/timing/timezone.cxx @@ -136,14 +136,15 @@ SGTimeZoneContainer::SGTimeZoneContainer(const char *filename) char buffer[256]; FILE* infile = fopen(filename, "rb"); if (!(infile)) { - string e = "Unable to open time zone file '"; + std::string e = "Unable to open time zone file '"; throw sg_exception(e + filename + '\''); } errno = 0; while (1) { - fgets(buffer, 256, infile); + if (0 == fgets(buffer, 256, infile)) + break; if (feof(infile)) { break; }