From: Ben Pfaff Date: Thu, 21 Jul 2022 01:15:34 +0000 (-0700) Subject: syntax-gen: Test the category properly. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=708f2f1b12056e77b03749aa7b5931dc07819356;hp=9acce16d7852918952aff5b420ba0057019d68c2;p=pspp syntax-gen: Test the category properly. This code was testing the format type against a collection of format type categories, which doesn't make any sense. This commit fixes the problem. Found by inspection. --- diff --git a/src/ui/syntax-gen.c b/src/ui/syntax-gen.c index b338bdf9c4..54a7845b70 100644 --- a/src/ui/syntax-gen.c +++ b/src/ui/syntax-gen.c @@ -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;