diff options
Diffstat (limited to 'otherlibs/graph/open.c')
-rw-r--r-- | otherlibs/graph/open.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/otherlibs/graph/open.c b/otherlibs/graph/open.c index e3529d42d..14a00eafd 100644 --- a/otherlibs/graph/open.c +++ b/otherlibs/graph/open.c @@ -244,8 +244,7 @@ value caml_gr_window_id(void) value caml_gr_set_window_title(value n) { if (window_name != NULL) stat_free(window_name); - window_name = caml_stat_alloc(strlen(String_val(n))+1); - strcpy(window_name, String_val(n)); + window_name = caml_strdup(String_val(n)); if (caml_gr_initialized) { XStoreName(caml_gr_display, caml_gr_window.win, window_name); XSetIconName(caml_gr_display, caml_gr_window.win, window_name); |