Commit fe9adb3d authored by Jon Kåre Hellan's avatar Jon Kåre Hellan

(mps_add_bound): Allocate sufficient space in

bound->name for all possible values of counter.
parent 3e35ea6a
2002-08-16 Jon K Hellan <hellan@acm.org>
* parser.c (mps_add_bound): Allocate sufficient space in
bound->name for all possible values of counter.
2002-08-12 Jody Goldberg <jody@gnome.org>
* Release 1.1.7
......
......@@ -463,8 +463,9 @@ mps_add_bound (MpsInputContext *ctxt, MpsBoundType type, gchar *bound_name,
if (info == NULL)
return FALSE; /* Column is not defined */
bound = g_new (MpsBound, 1);
bound->name = g_new (gchar, strlen (bound_name) + 13);
bound = g_new (MpsBound, 1);
bound->name = g_new (gchar,
4 * sizeof (gint) + strlen (bound_name) + 11);
sprintf(bound->name, "Bound #%d: %s", ctxt->n_bounds + 1, bound_name);
bound->col_index = info->index;
bound->value = atof (value_str);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment