projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
afefc84
)
syntax-gen: Test the category properly.
author
Ben Pfaff
<blp@cs.stanford.edu>
Thu, 21 Jul 2022 01:15:34 +0000
(18:15 -0700)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Fri, 29 Jul 2022 21:05:45 +0000
(14:05 -0700)
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.
src/ui/syntax-gen.c
patch
|
blob
|
history
diff --git
a/src/ui/syntax-gen.c
b/src/ui/syntax-gen.c
index b338bdf9c4c742dc07dc81d393a37accdc9281ec..54a7845b70d44722c6b3bcb531def0556a3365fd 100644
(file)
--- 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
- && (f
ormat->type
+ && (f
mt_get_category (format->type)
& (FMT_CAT_DATE | FMT_CAT_TIME | FMT_CAT_DATE_COMPONENT)))
{
union value v_in, v_out;