should line 1905 be + 1 on the malloc? filename = g_malloc(sci_get_selected_text_length(doc_list[idx].sci)); sci_get_selected_text(doc_list[idx].sci, filename); bd -- http://www.blackdog-haxe.com/ "It is no measure of health to be well adjusted to a profoundly sick society." --Jiddu Krishnamurti