Commit ecd7c392 authored by Jonathan Blandford's avatar Jonathan Blandford Committed by Jonathan Blandford

remember strlen (string) + 1 gives you the length necessary to copy a

2000-02-17  Jonathan Blandford  <jrb@redhat.com>

	* src/nautilus-index-title.c (nautilus_index_title_set_up_label):
	remember strlen (string) + 1 gives you the length necessary to
	copy a string, not strlen.
parent 4988305f
......@@ -232,7 +232,7 @@ nautilus_index_title_set_up_label (NautilusIndexTitle *index_title, const char *
split_offset = mid_point - index;
if (split_offset != 0) {
char *buffer = (char *) g_malloc(strlen(file_name) + 1);
char *buffer = (char *) g_malloc(strlen(file_name) + 2);
/* build the new string, with a CR inserted, also remembering them separately for measuring */
......
......@@ -232,7 +232,7 @@ nautilus_index_title_set_up_label (NautilusIndexTitle *index_title, const char *
split_offset = mid_point - index;
if (split_offset != 0) {
char *buffer = (char *) g_malloc(strlen(file_name) + 1);
char *buffer = (char *) g_malloc(strlen(file_name) + 2);
/* build the new string, with a CR inserted, also remembering them separately for measuring */
......
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