forked from enlightenment/efl
parent
650606ab90
commit
ddb189bb1f
|
@ -96,8 +96,10 @@ _elm_code_line_merge_into(Elm_Code_Line *line1, Elm_Code_Line *line2)
|
|||
text2 = elm_code_line_text_get(line2, &length2);
|
||||
|
||||
newtext = malloc(sizeof(char) * (length1 + length2 + 1));
|
||||
snprintf(newtext, length1 + 1, "%s", text1);
|
||||
snprintf(newtext + length1, length2 + 1, "%s", text2);
|
||||
if (length1 > 0)
|
||||
snprintf(newtext, length1 + 1, "%s", text1);
|
||||
if (length2 > 0)
|
||||
snprintf(newtext + length1, length2 + 1, "%s", text2);
|
||||
|
||||
tokens1 = line1->tokens;
|
||||
line1->tokens = NULL;
|
||||
|
|
|
@ -74,8 +74,8 @@ _elm_code_widget_text_multi_get(Elm_Code_Widget *widget, Elm_Code_Widget_Data *p
|
|||
for (row = start_line + 1; row < end_line; row++)
|
||||
{
|
||||
line = elm_code_file_line_get(pd->code->file, row);
|
||||
snprintf(ptr, line->length + 1, "%s",
|
||||
elm_code_line_text_get(line, NULL));
|
||||
if (line->length > 0)
|
||||
snprintf(ptr, line->length + 1, "%s", elm_code_line_text_get(line, NULL));
|
||||
|
||||
snprintf(ptr + line->length, newline_len + 1, "%s", newline);
|
||||
ptr += line->length + newline_len;
|
||||
|
|
Loading…
Reference in New Issue