Frequencies Dialog: Avoid initialising things more than once per dialog
[pspp] / src / data / data-in.c
index 5d4496cf9085de0d54509f224a89e0b0261935d1..ace167090c57b9f2f2fe97a4d4e96cd80405764d 100644 (file)
@@ -919,7 +919,7 @@ parse_year (struct data_in *i, long *year, size_t max_digits)
       else
         *year += epoch_century + 100;
     }
-  if (*year >= 1582 || *year <= 19999)
+  if (*year >= 1582 && *year <= 19999)
     return NULL;
 
   return xasprintf (_("Year (%ld) must be between 1582 and 19999."), *year);
@@ -1044,7 +1044,7 @@ parse_minute_second (struct data_in *i, double *time)
     *cp++ = ss_get_byte (&i->input);
   *cp = '\0';
 
-  *time += strtod (buf, NULL);
+  *time += c_strtod (buf, NULL);
 
   return NULL;
 }