tab: Fix implementation of "middle" vertical alignment in tab_get_cell().
authorBen Pfaff <blp@cs.stanford.edu>
Wed, 2 Jan 2019 22:36:34 +0000 (14:36 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Wed, 2 Jan 2019 22:50:14 +0000 (14:50 -0800)
Found by GCC 4.9.

Fixes: a7a300e7d996 ("output: Support decimal and mixed alignment,")
src/output/tab.c

index f6f965022e14daaa6fc8d91ab34f8c540cbb906b..4d852daebc506f6fe562d85f1c2d5b8c29ac5c9f 100644 (file)
@@ -513,7 +513,7 @@ tab_get_cell (const struct table *table, int x, int y,
            : TABLE_HALIGN_RIGHT);
       enum table_valign valign
         = ((opt & TAB_VALIGN) == TAB_TOP ? TABLE_VALIGN_TOP
-           : (opt & TAB_VALIGN) == TAB_CENTER ? TABLE_VALIGN_CENTER
+           : (opt & TAB_VALIGN) == TAB_MIDDLE ? TABLE_VALIGN_CENTER
            : TABLE_VALIGN_BOTTOM);
 
       cell->style = &styles[halign][valign];