This ensures that hexadecimal format widths will be a multiple
of 2 after fmt_fix() finishes with them.
This function is used only by the GUI, which doesn't generally
work with hexadecimal formats, so it might not fix a real bug
in practice.
void
fmt_fix (struct fmt_spec *fmt, bool for_input)
{
+ unsigned int step;
int min_w, max_w;
int max_d;
else if (fmt->w > max_w)
fmt->w = max_w;
+ /* Round width to step. */
+ step = fmt_step_width (fmt->type);
+ fmt->w = ROUND_DOWN (fmt->w, step);
+
/* First, if FMT has more decimal places than allowed, attempt
to increase FMT's width until that number of decimal places
can be achieved. */