syntax-gen: Test the category properly.
[pspp] / src / ui / syntax-gen.c
index b338bdf9c4c742dc07dc81d393a37accdc9281ec..54a7845b70d44722c6b3bcb531def0556a3365fd 100644 (file)
@@ -149,7 +149,7 @@ syntax_gen_number (struct string *output,
 {
   assert (format == NULL || fmt_is_numeric (format->type));
   if (format != NULL
-      && (format->type
+      && (fmt_get_category (format->type)
           & (FMT_CAT_DATE | FMT_CAT_TIME | FMT_CAT_DATE_COMPONENT)))
     {
       union value v_in, v_out;