+Sat May 6 22:25:09 2006 Ben Pfaff <blp@gnu.org>
+
+ Fix segfault.
+
+ * list.q (write_fallback_headers): (write_fallback_headers)
+ Properly record width of leader and pass it to write_varname().
+
Sat May 6 19:03:13 2006 Ben Pfaff <blp@gnu.org>
* get.c: (mtf_merge_dictionary) Fix value label memory leak.
while (index < cmd.n_variables)
{
struct outp_text text;
+ int leader_width;
/* Ensure that there is enough room for a line of text. */
if (d->cp_y + d->font_height > d->length)
text.y = d->cp_y;
text.h = text.v = INT_MAX;
d->class->text_draw (d, &text);
- d->class->text_metrics (d, &text, &d->cp_x, NULL);
+ d->class->text_metrics (d, &text, &leader_width, NULL);
+ d->cp_x = leader_width;
goto entry;
do
}
{
- char varname[10];
- sprintf (varname, " %s", cmd.v_variables[index]->name);
- write_varname (d, varname, text.h);
+ char varname[LONG_NAME_LEN + 2];
+ snprintf (varname, sizeof varname,
+ " %s", cmd.v_variables[index]->name);
+ write_varname (d, varname, leader_width);
}
}
while (++index < cmd.n_variables);