diff options
Diffstat (limited to 'src/glibext/linecolumn.c')
-rw-r--r-- | src/glibext/linecolumn.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/glibext/linecolumn.c b/src/glibext/linecolumn.c index 2d24926..6b6937f 100644 --- a/src/glibext/linecolumn.c +++ b/src/glibext/linecolumn.c @@ -153,7 +153,7 @@ size_t append_text_to_line_column(line_column *column, const char *text, size_t segment = get_new_line_segment(type, text, length); - column->segments = (line_segment **)realloc(column->segments, ++column->count * sizeof(line_segment *)); + column->segments = realloc(column->segments, ++column->count * sizeof(line_segment *)); column->segments[result] = segment; @@ -396,6 +396,8 @@ line_segment *get_line_column_content_from_index(const line_column *column, size result = column->segments[index]; + ref_line_segment(result); + return result; } |