projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
95c2bfa
)
render: Fix pathological case where column minimum width exceeds maximum.
author
Ben Pfaff
<blp@cs.stanford.edu>
Sun, 25 Nov 2018 18:04:40 +0000
(10:04 -0800)
committer
Ben Pfaff
<blp@cs.stanford.edu>
Mon, 26 Nov 2018 01:16:46 +0000
(17:16 -0800)
src/output/render.c
patch
|
blob
|
history
diff --git
a/src/output/render.c
b/src/output/render.c
index 11830a3e8e4125addea848732be02f9fb65fe89a..19244a14b8fd13e670f513cb19a9e04fd6af0923 100644
(file)
--- a/
src/output/render.c
+++ b/
src/output/render.c
@@
-784,6
+784,13
@@
render_page_create (const struct render_params *params, struct table *table)
table_cell_free (&cell);
}
table_cell_free (&cell);
}
+ /* In pathological cases, spans can cause the minimum width of a column to
+ exceed the maximum width. This bollixes our interpolation algorithm
+ later, so fix it up. */
+ for (i = 0; i < nc; i++)
+ if (columns[MIN][i].width > columns[MAX][i].width)
+ columns[MAX][i].width = columns[MIN][i].width;
+
/* Decide final column widths. */
for (i = 0; i < 2; i++)
table_widths[i] = calculate_table_width (table_nc (table),
/* Decide final column widths. */
for (i = 0; i < 2; i++)
table_widths[i] = calculate_table_width (table_nc (table),